irfpy.vexpvat.ql.panels
¶
Most of the functions assumes the irfpy.vexpvat.vexspice
module is initialized prior.
>>> from irfpy.vexpvat import vexspice as vs
>>> vs.init()
- class irfpy.vexpvat.ql.panels.Panel_xr_orbit(t0=None, t1=None, ax=None, frame='VSO')[source]¶
Bases:
object
Create a matplotlib axis.
Usage
Import needed modules
import datetime import matplotlib.pyplot as plt from irfpy.util import utc import irfpy.vexpvat.vexspice as vs vs.init() from irfpy.vexpvat.ql import Panel_xr_orbit
2-a. To plot a simple, default figure
t0 = datetime.datetime(2006, 12, 1, 5, 0) t1 = datetime.datetime(2006, 12, 1, 8, 0) xrplot = Panel_xr_orbit(t0, t1)
2-b. To add some more data points, use the
add_orbit_curve()
,add_ticks()
,add_timelabel()
.t2 = datetime.datetime(2006, 12, 1, 14, 0) t3 = datetime.datetime(2006, 12, 1, 16, 0) xrplot.add_orbit_curve(t2, t3, color='b') xrplot.add_ticks(utc.dtlinspace(t2, t3, 4), color='b', marker='x') xrplot.add_timelabel(utc.dtlinspace(t2, t3, 4), color='b', datefmt='(%H:%M)', va='center', fontsize=6)
2-c. To add some cosmetics, use
xrplot.ax
as a normal matplotlib axis object.ax = xrplot.ax ax.set_xlim(-4, 4) # Change the limit, for example, as usual for matplotlib. ax.text(0, 0, 'VENUS', color='k')
You can embed the panel to a figure.
fig = plt.figure() ax = fig.add_subplot(2, 2, 2) # Plot goes to the top-right xrplot2 = Panel_xr_orbit(ax=ax) xrplot2.add_orbit_curve(t1, t2) xrplot2.add_venus()
- irfpy.vexpvat.ql.panels.axis_object(t, target, ax=None, marker='o', color='k', **kwds)[source]¶
Add a point to the axis!
- Parameters
t – Time
ax – Axis object
kwds – Given to axes.text function
- Returns
Axis object