Schedule.draw¶
- Schedule.draw(dt=1, style=None, filename=None, interp_method=None, scale=None, channel_scales=None, channels_to_plot=None, plot_all=False, plot_range=None, interactive=False, table=True, label=False, framechange=True, scaling=None, channels=None, show_framechange_channels=True)[source]¶
Plot the schedule.
- Parameters
dt (
float
) – Time interval of samples.style (Optional[SchedStyle]) – A style sheet to configure plot appearance.
filename (
Optional
[str
]) – Name required to save pulse image.interp_method (
Optional
[Callable
]) – A function for interpolation.scale (
Optional
[float
]) – Relative visual scaling of waveform amplitudes, see Additional Information.channel_scales (
Optional
[Dict
[Channel
,float
]]) – Channel independent scaling as a dictionary ofChannel
object.channels_to_plot (
Optional
[List
[Channel
]]) – Deprecated, seechannels
.plot_all (
bool
) – Plot empty channels.plot_range (
Optional
[Tuple
[float
]]) – A tuple of time range to plot.interactive (
bool
) – When set true show the circuit in a new window (this depends on the matplotlib backend being used supporting this).table (
bool
) – Draw event table for supported commands.label (
bool
) – Label individual instructions.framechange (
bool
) – Add framechange indicators.scaling (
Optional
[float
]) – Deprecated, seescale
.channels (
Optional
[List
[Channel
]]) – A list of channel names to plot.show_framechange_channels (
bool
) – Plot channels with only framechanges.
- Additional Information:
If you want to manually rescale the waveform amplitude of channels one by one, you can set
channel_scales
argument instead ofscale
. Thechannel_scales
should be given as a python dictionary:channel_scales = {pulse.DriveChannels(0): 10.0, pulse.MeasureChannels(0): 5.0}
When the channel to plot is not included in the
channel_scales
dictionary, scaling factor of that channel is overwritten by the value ofscale
argument. In default, waveform amplitude is normalized by the maximum amplitude of the channel. The scaling factor is displayed under the channel name alias.
- Returns
A matplotlib figure object of the pulse schedule.
- Return type
matplotlib.Figure