1515from shapely .geometry .base import BaseGeometry
1616from shapely .strtree import STRtree
1717
18+ from emsarray import plot as _plot
1819from emsarray import utils
1920from emsarray .exceptions import InvalidPolygonWarning , NoSuchCoordinateError
2021from emsarray .operations import depth , point_extraction
2122from emsarray .operations .cache import hash_attributes , hash_int , hash_string
22- from emsarray .plot import (
23- _requires_plot , animate_on_figure , make_plot_title , plot_on_figure ,
24- polygons_to_collection
25- )
2623from emsarray .state import State
2724from emsarray .types import Bounds , DataArrayOrName , Pathish
2825
@@ -709,7 +706,7 @@ def wind(
709706 pass
710707
711708 @cached_property # type: ignore
712- @_requires_plot
709+ @_plot . _requires_plot
713710 def data_crs (self ) -> 'CRS' :
714711 """
715712 The coordinate reference system that coordinates in this dataset are
@@ -721,7 +718,7 @@ def data_crs(self) -> 'CRS':
721718 from cartopy .crs import PlateCarree
722719 return PlateCarree ()
723720
724- @_requires_plot
721+ @_plot . _requires_plot
725722 def plot_on_figure (
726723 self ,
727724 figure : 'Figure' ,
@@ -778,11 +775,11 @@ def plot_on_figure(
778775 #
779776 # Users can supply their own titles
780777 # if this automatic behaviour is insufficient
781- kwargs ['title' ] = make_plot_title (self .dataset , kwargs ['scalar' ])
778+ kwargs ['title' ] = _plot . make_plot_title (self .dataset , kwargs ['scalar' ])
782779
783- plot_on_figure (figure , self , ** kwargs )
780+ _plot . plot_on_figure (figure , self , ** kwargs )
784781
785- @_requires_plot
782+ @_plot . _requires_plot
786783 def plot (self , * args : Any , ** kwargs : Any ) -> None :
787784 """Plot a data array and automatically display it.
788785
@@ -801,7 +798,7 @@ def plot(self, *args: Any, **kwargs: Any) -> None:
801798 self .plot_on_figure (pyplot .figure (), * args , ** kwargs )
802799 pyplot .show ()
803800
804- @_requires_plot
801+ @_plot . _requires_plot
805802 def animate_on_figure (
806803 self ,
807804 figure : 'Figure' ,
@@ -899,9 +896,9 @@ def animate_on_figure(
899896 title_bits .append ('{}' )
900897 kwargs ['title' ] = '\n ' .join (title_bits )
901898
902- return animate_on_figure (figure , self , coordinate = coordinate , ** kwargs )
899+ return _plot . animate_on_figure (figure , self , coordinate = coordinate , ** kwargs )
903900
904- @_requires_plot
901+ @_plot . _requires_plot
905902 @utils .timed_func
906903 def make_poly_collection (
907904 self ,
@@ -978,9 +975,9 @@ def make_poly_collection(
978975 if 'transform' not in kwargs :
979976 kwargs ['transform' ] = self .data_crs
980977
981- return polygons_to_collection (self .polygons [self .mask ], ** kwargs )
978+ return _plot . polygons_to_collection (self .polygons [self .mask ], ** kwargs )
982979
983- @_requires_plot
980+ @_plot . _requires_plot
984981 def make_quiver (
985982 self ,
986983 axes : 'Axes' ,
0 commit comments