@@ -39,7 +39,6 @@ def _import_pycirclize():
3939 return pycirclize
4040
4141
42- < << << << HEAD
4342def _unwrap_axes (ax , label : str ):
4443 if ax .__class__ .__name__ == "SubplotGrid" :
4544 if len (ax ) != 1 :
@@ -58,11 +57,6 @@ def _ensure_polar(ax, label: str):
5857 ax ._unshare (which = "y" )
5958 ax ._ultraplot_axis_type = ("circos" , type (ax ))
6059 return ax
61- == == == =
62- def _ensure_polar (ax , label : str ) -> None :
63- if not isinstance (ax , MplPolarAxes ):
64- raise ValueError (f"{ label } requires a polar axes (proj='polar')." )
65- > >> >> >> e25e709f (feat : add pycirclize plot wrappers )
6660
6761
6862def _cycle_colors (n : int ) -> list [str ]:
@@ -121,11 +115,7 @@ def circos(
121115 """
122116 Create a pyCirclize Circos instance (optionally plot immediately).
123117 """
124- < << << << HEAD
125118 ax = _ensure_polar (ax , "circos" )
126- == == == =
127- _ensure_polar (ax , "circos" )
128- >> >> >> > e25e709f (feat : add pycirclize plot wrappers )
129119 pycirclize = _import_pycirclize ()
130120 circos_obj = pycirclize .Circos (
131121 sectors ,
@@ -163,11 +153,7 @@ def chord_diagram(
163153 """
164154 Render a chord diagram using pyCirclize on the provided polar axes.
165155 """
166- < << << << HEAD
167156 ax = _ensure_polar (ax , "chord_diagram" )
168- == == == =
169- _ensure_polar (ax , "chord_diagram" )
170- >> >> >> > e25e709f (feat : add pycirclize plot wrappers )
171157
172158 pycirclize , matrix_obj , cmap = _resolve_chord_defaults (matrix , cmap )
173159 label_kws = {} if label_kws is None else dict (label_kws )
@@ -228,11 +214,7 @@ def radar_chart(
228214 """
229215 Render a radar chart using pyCirclize on the provided polar axes.
230216 """
231- < << << << HEAD
232217 ax = _ensure_polar (ax , "radar_chart" )
233- == == == =
234- _ensure_polar (ax , "radar_chart" )
235- >> >> >> > e25e709f (feat : add pycirclize plot wrappers )
236218
237219 pycirclize , table_obj , cmap = _resolve_radar_defaults (table , cmap )
238220 grid_line_kws = {} if grid_line_kws is None else dict (grid_line_kws )
@@ -288,11 +270,7 @@ def phylogeny(
288270 """
289271 Render a phylogenetic tree using pyCirclize on the provided polar axes.
290272 """
291- < << << << HEAD
292273 ax = _ensure_polar (ax , "phylogeny" )
293- == == == =
294- _ensure_polar (ax , "phylogeny" )
295- >> >> >> > e25e709f (feat : add pycirclize plot wrappers )
296274 pycirclize = _import_pycirclize ()
297275 if leaf_label_size is None :
298276 leaf_label_size = rc ["font.size" ]
@@ -332,11 +310,7 @@ def circos_bed(
332310 """
333311 Create a Circos instance from a BED file (optionally plot immediately).
334312 """
335- < << << << HEAD
336313 ax = _ensure_polar (ax , "circos_bed" )
337- == == == =
338- _ensure_polar (ax , "circos_bed" )
339- >> >> >> > e25e709f (feat : add pycirclize plot wrappers )
340314 pycirclize = _import_pycirclize ()
341315 circos_obj = pycirclize .Circos .initialize_from_bed (
342316 bed_file ,
0 commit comments