Classes | |
class | PlotError |
Functions | |
def | sphere3D |
def | equator |
def | negative_color |
Compute hex code of the corresponding negative color. More... | |
def | timeserie |
Plot a timeserie object. More... | |
def | timeserie_axe |
Make axis for a timeserie plot. More... | |
def | double_timeserie |
Plot 2 timeseries on the same plot. More... | |
def | map2D |
def | fieldline3D |
def | fieldline2D |
Plot a list of fieldlines in a 2D plot. More... | |
def | slice2D |
def | chole |
Plot a coronal hole element Chole. More... | |
def | plot_contour |
Compute line contour from Map2D or Cube3D object and plot it. More... | |
def | plot_visible_disk |
Compute visible disk from a point (on a unit sphere?). More... | |
Variables | |
dictionary | colormaps |
def common.plot_common.chole | ( | sub, | |
choles | |||
) |
Plot a coronal hole element Chole.
[in] | sub,: | an existant Axis or SubplotBase object |
[in] | choles,: | list of module_chole.Chole() objects. |
[out] | img_chole,: | list Artist object |
def common.plot_common.double_timeserie | ( | sub, | |
timeserie1, | |||
timeserie2, | |||
color1 = 'r' , |
|||
color2 = 'b' , |
|||
index1 = None , |
|||
index2 = None , |
|||
label1 = None , |
|||
label2 = None , |
|||
ylabel = None , |
|||
linewidth = 0.1 , |
|||
marker = '.' , |
|||
markersize = 1 |
|||
) |
Plot 2 timeseries on the same plot.
[in] | sub,: | an existant Axis or SubplotBase object |
[in] | timeserie1 | and timeserie2: module_timeserie.Timeserie objects to be plot |
[in] | color1 | and color2: plotted colors. Default: red and blue. |
[in] | index1 | and index2: tuple index of the data to be plot (timeserie.data is a list of tuples). Default: 0 and 0. |
[in] | label1 | and label2: labels in the legend. Default: Data name and data unit. |
[in] | ylabel,: | y-label of the plot. Default: Data names of the 2 timeserie. |
[in] | linewidth. | Default: 0.1 |
[in] | maker. | Type of marker. Default: . |
[in] | markersize. | Size of marker. Default: 1 |
[out] | Artist | object |
def common.plot_common.equator | ( | sub, | |
color | |||
) |
Plot dashed equator line. Input: * sub: an existant matplotlib.axes._subplots.Axes3DSubplot object * color Output: * eq: matplotlib.lines.Line2D object
def common.plot_common.fieldline2D | ( | sub, | |
fieldlines, | |||
color, | |||
label, | |||
proj = 'rlon' |
|||
) |
Plot a list of fieldlines in a 2D plot.
[in] | sub,: | an existant matplotlib.axes._subplots.Axes3DSubplot object created with polar projection (sub = fig.add_subplot(111, projection='polar')) |
[in] | fieldlines,: | list of fieldlines |
[in] | color | |
[in] | label,: | legend for the first fieldline only |
[in] | proj,: | 'rlon' for radius,longitude plot, 'rlat' for radius,latitude plot. |
[out] | fl,: | list of matplotlib.lines.Line2D objects |
def common.plot_common.fieldline3D | ( | sub, | |
fieldlines, | |||
color, | |||
label | |||
) |
Plot a list of fieldlines. Input: * sub: an existant matplotlib.axes._subplots.Axes3DSubplot object * fieldlines: list of fieldlines * color * label: legend for the first fieldline only Output: * fl: list of mpl_toolkits.mplot3d.art3d objects
def common.plot_common.map2D | ( | sub, | |
plotmap_type, | |||
map2D_data, | |||
vmin, | |||
vmax, | |||
zorder | |||
) |
Plot a map2D background image. Input: * sub: an existant Axis or SubplotBase object * plotmap_type: sth in ['WSO','NSO','ADAPT','SDO171','SDO193','SOHO171','SOHO195'] * map2D_data: map2D object to be plot * vmin,vmax: min and max plot range * zorder: order of apparition in plot (0 means background, >0 foreground) Output: * bimg: Artist object
def common.plot_common.negative_color | ( | color | ) |
Compute hex code of the corresponding negative color.
[in] | color,: | string for color |
[out] | negative,: | hex code for negative color |
def common.plot_common.plot_contour | ( | sub, | |
mag_object, | |||
levels, | |||
labels = None , |
|||
color = 'r' , |
|||
linestyle = 'dashed' , |
|||
r = 2.5 |
|||
) |
Compute line contour from Map2D or Cube3D object and plot it.
[in] | sub: an existant Axis or SubplotBase object or None if you do not want to plot (Achtung: if None, plt will be closed!) | |
[in] | mag_object: Map2D or Cube3D object containing radial magnetic field data | |
[in] | levels: list of float (1..n) levels to be plot | |
[in] | labels: list of strings (1..n) labels in legend. Default: empty string(s). | |
[in] | color: color plot. Defaut: red. | |
[in] | linestyle: dashed (default) or solid | |
[in] | r: altitude in solar radius where the contour is drawn. Default: 2.5. For map2D object, not taken into account, only for the output points. For cube3D, take the slice at altitude r. | |
[out] | points: list of nlevel list | |
[out] | points[ilevel]: list of module_timespace.Coordinate objects. R = input r. |
def common.plot_common.plot_visible_disk | ( | sub, | |
position, | |||
levels, | |||
labels = None , |
|||
color = 'r' , |
|||
linestyle = 'solid' , |
|||
r = 1 |
|||
) |
Compute visible disk from a point (on a unit sphere?).
Grid for plotting:
[in] | sub: an existant Axis or SubplotBase object or None if you do not want to plot (Achtung: if None, plt will be closed!) | |
[in] | position: module_timespace.Coordinate object | |
[in] | levels: list of float (1..n) levels to be plot | |
[in] | labels: list of strings (1..n) labels in legend. Default: empty string(s). | |
[in] | color: color plot. Defaut: red. | |
[in] | linestyle: Default: solid. | |
[in] | r: altitude in solar radius where the contour is drawn. Default: 2.5. For map2D object, not taken into account, only for the output points. For cube3D, take the slice at altitude r. | |
[out] | points: list of nlevel list | |
[out] | points[ilevel]: list of module_timespace.Coordinate objects. R = Rsun. |
def common.plot_common.slice2D | ( | sub, | |
cube3D_data, | |||
var, | |||
dim, | |||
i, | |||
vmin, | |||
vmax, | |||
zorder | |||
) |
Plot a cube3D slice background image. Input: * sub: an existant Axis or SubplotBase object * cube3D_data: cube3D object to be plot * var: br, bthe, bphi or b1, b2, b3 * dim: 0 or 1 or 2. Slice dim to be plot. * i: index of the slice. * zorder: order of apparition in plot (0 means background, >0 foreground) Output: * bimg: Artist object
def common.plot_common.sphere3D | ( | sub, | |
x0, | |||
y0, | |||
z0, | |||
r, | |||
color | |||
) |
Plot a sphere. Input: * sub: an existant matplotlib.axes._subplots.Axes3DSubplot object * x0,y0,z0,r: center cartesian coordinate and radius * color Output: * sphere: mpl_toolkits.mplot3d.art3d.Poly3DCollection object
def common.plot_common.timeserie | ( | sub, | |
timeserie, | |||
color, | |||
index = 0 , |
|||
color_positive = False , |
|||
linewidth = 0.1 , |
|||
marker = '.' , |
|||
markersize = 1 |
|||
) |
Plot a timeserie object.
[in] | sub,: | an existant Axis or SubplotBase object |
[in] | timeserie,: | map2D object to be plot |
[in] | color | |
[in] | index,: | as timeserie data is a tuple, select only the index-element of this tuple |
[in] | color_positive,: | boolean. False by default. If True, input color for positive value, negative input color for negative |
[in] | linewidth. | Default: 0.1 |
[in] | maker. | Type of marker. Default: . |
[in] | markersize. | Size of marker. Default: 1 |
[out] | Artist | object |
def common.plot_common.timeserie_axe | ( | sub, | |
timeserie, | |||
index = 0 |
|||
) |
Make axis for a timeserie plot.
dictionary common.plot_common.colormaps |