tile_with_blotches = "APF0000004"Markings
calc_fig_size
def calc_fig_size(
width
):
Calc figure height in ratio of subframes.
show_subframe
def show_subframe(
tile_id, ax:NoneType=None, aspect:str='auto'
):
set_subframe_size
def set_subframe_size(
ax
):
Set plot view limit on Planet 4 subframe size.
Blotch
def Blotch(
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
):
A scale-free ellipse.
b = Blotch.from_tile_id(tile_with_blotches)bBlotch.from_marking_id('B010c77') # tile_id='APF0000004', area=571.2238541501484
b.plot()
Blotches
def Blotches(
df, with_center:bool=False, color:str='red'
):
Container for Blotch objects with idempotent plotting.
The class creates a fresh PatchCollection on each call to plot() and removes any previously-added collection to avoid Matplotlib errors when reusing the same Blotches instance across axes/figures.
TileBlotches
def TileBlotches(
tile_id, # planetfour tile_id
with_center:bool=False, color:str='green'
):
Container for Blotch objects with idempotent plotting.
The class creates a fresh PatchCollection on each call to plot() and removes any previously-added collection to avoid Matplotlib errors when reusing the same Blotches instance across axes/figures.
tb = TileBlotches(tile_with_blotches)tb.plot()
rotate_vector
def rotate_vector(
v, # Vector to be rotated
angle, # Angle in degrees
):
Rotate vector by angle given in degrees.
Fan
def Fan(
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
):
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.
tile_with_fans = "APF000000c"f = Fan.from_tile_id(tile_with_fans, 1)fFan.from_marking_id('F00b604') # tile_id='APF000000c', area=834.5280047852875
f.plot('red')
Fans
def Fans(
df, scope:str='planet4', with_center:bool=False, color:str='green', kwargs:VAR_KEYWORD
):
Container for Fan objects backed by a LineCollection for plotting.
This class keeps a list of Fan instances in self.collection and a matching list of 2D arrays in self.segments suitable for matplotlib.collections.LineCollection.
The plot method is idempotent: it removes any previously-added LineCollection artist before adding a fresh one, so calling .plot() repeatedly or from different axes won’t raise Matplotlib errors.
fans = io.get_fans_for_tile('c')fans = Fans(io.get_fans_for_tile('c'))fans.plot()
TileFans
def TileFans(
tile_id, scope:str='planet4', with_center:bool=False, color:str='green', kwargs:VAR_KEYWORD
):
Container for Fan objects backed by a LineCollection for plotting.
This class keeps a list of Fan instances in self.collection and a matching list of 2D arrays in self.segments suitable for matplotlib.collections.LineCollection.
The plot method is idempotent: it removes any previously-added LineCollection artist before adding a fresh one, so calling .plot() repeatedly or from different axes won’t raise Matplotlib errors.
TileFans('c').plot()