Skip to content

Commit

Permalink
Matplotlib backend fix for contour calc
Browse files Browse the repository at this point in the history
  • Loading branch information
SorooshMani-NOAA committed Jan 17, 2024
1 parent c30ebe6 commit 74981a4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ocsmesh/geom/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import os
from typing import Union, Optional

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.axes import Axes
from shapely.geometry import MultiPolygon
Expand Down
2 changes: 2 additions & 0 deletions ocsmesh/mesh/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import pandas as pd
import geopandas as gpd
from jigsawpy import jigsaw_msh_t, savemsh, loadmsh, savevtk
import matplotlib
matplotlib.use('Agg')
from matplotlib.path import Path
from matplotlib.transforms import Bbox
from matplotlib.tri import Triangulation
Expand Down
2 changes: 2 additions & 0 deletions ocsmesh/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
from typing_extensions import Literal

import geopandas as gpd
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.cm import ScalarMappable
from matplotlib.transforms import Bbox
Expand Down
2 changes: 2 additions & 0 deletions ocsmesh/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

import jigsawpy
from jigsawpy import jigsaw_msh_t # type: ignore[import]
import matplotlib
matplotlib.use('Agg')
from matplotlib.path import Path # type: ignore[import]
import matplotlib.pyplot as plt # type: ignore[import]
from matplotlib.tri import Triangulation # type: ignore[import]
Expand Down

0 comments on commit 74981a4

Please sign in to comment.