tile_with_blotches = "APF0000004"markings
module to work with both fan and blotch markings graphically
calc_fig_size
calc_fig_size (width)
Calc figure height in ratio of subframes.
show_subframe
show_subframe (tile_id, ax=None, aspect='auto')
set_subframe_size
set_subframe_size (ax)
Set plot view limit on Planet 4 subframe size.
Blotch
Blotch (data, scope='planet4', with_center=False, url_db='', **kwargs)
A scale-free ellipse.
| Type | Default | Details | |
|---|---|---|---|
| data | object with blotch data attributes: x, y, radius_1, radius_2, angle | ||
| scope | str | planet4 | “planet4” or “hirise” |
| with_center | bool | False | if True, plot the center of the blotch |
| url_db | str | path to the url database | |
| kwargs | VAR_KEYWORD |
b = Blotch.from_tile_id(tile_with_blotches)b.plot()--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) Cell In[12], line 1 ----> 1 b.plot() Cell In[8], line 159, in Blotch.plot(self, color, ax) 157 if color is not None: 158 self.set_color(color) --> 159 ax.add_patch(self) 160 if self.with_center: 161 self.plot_center(ax, color=color) File ~/miniforge3/envs/py312/lib/python3.12/site-packages/matplotlib/axes/_base.py:2473, in _AxesBase.add_patch(self, p) 2469 """ 2470 Add a `.Patch` to the Axes; return the patch. 2471 """ 2472 _api.check_isinstance(mpatches.Patch, p=p) -> 2473 self._set_artist_props(p) 2474 if p.get_clip_path() is None: 2475 p.set_clip_path(self.patch) File ~/miniforge3/envs/py312/lib/python3.12/site-packages/matplotlib/axes/_base.py:1226, in _AxesBase._set_artist_props(self, a) 1224 def _set_artist_props(self, a): 1225 """Set the boilerplate props for artists added to Axes.""" -> 1226 a.set_figure(self.get_figure(root=False)) 1227 if not a.is_transform_set(): 1228 a.set_transform(self.transData) File ~/miniforge3/envs/py312/lib/python3.12/site-packages/matplotlib/artist.py:755, in Artist.set_figure(self, fig) 749 # if we currently have a figure (the case of both `self.figure` 750 # and *fig* being none is taken care of above) we then user is 751 # trying to change the figure an artist is associated with which 752 # is not allowed for the same reason as adding the same instance 753 # to more than one Axes 754 if self._parent_figure is not None: --> 755 raise RuntimeError("Can not put single artist in " 756 "more than one figure") 757 self._parent_figure = fig 758 if self._parent_figure and self._parent_figure is not self: RuntimeError: Can not put single artist in more than one figure

TileBlotches
TileBlotches (tile_id, with_center=False, color='green')
Container for all blotches of a tile.
| Type | Default | Details | |
|---|---|---|---|
| tile_id | str | planetfour tile_id | |
| with_center | bool | False | |
| color | str | green |
tb = TileBlotches(tile_with_blotches)tb.plot()
rotate_vector
rotate_vector (v, angle)
Rotate vector by angle given in degrees.
| Type | Details | |
|---|---|---|
| v | ||
| angle | float | Angle in degrees |
Fan
Fan (data, scope='planet4', with_center=False, **kwargs)
A line - the line can have both a solid linestyle connecting all the vertices, and a marker at each vertex. Additionally, the drawing of the solid line is influenced by the drawstyle, e.g., one can create “stepped” lines in various styles.
| Type | Default | Details | |
|---|---|---|---|
| data | object with fan data attributes: x, y, angle, spread, distance | ||
| scope | str | planet4 | “planet4” or “hirise” |
| with_center | bool | False | if True, plot the center of the fan |
| kwargs | VAR_KEYWORD |
tile_with_fans = "APF000000c"f = Fan.from_tile_id(tile_with_fans, 1)f.plot()