This document provides a reference for the following Figure class objects:
Plot |
An extension of the core matplotlib Figure |
TimeSeriesPlot |
Figure for displaying a TimeSeries. |
FrequencySeriesPlot |
Figure for displaying a FrequencySeries |
SpectrogramPlot |
Figure for displaying a Spectrogram. |
SegmentPlot |
Plot for displaying a DataQualityFlag |
EventTablePlot |
Figure for displaying a EventTable |
BodePlot |
A Plot class for visualising transfer functions |
and the following Axes class objects:
Axes |
An extension of the core matplotlib Axes. |
TimeSeriesAxes |
Custom Axes for a TimeSeriesPlot. |
FrequencySeriesAxes |
Custom Axes for a FrequencySeriesPlot. |
SegmentAxes |
Custom Axes for a SegmentPlot. |
EventTableAxes |
Custom Axes for an ~gwpy.plotter.EventTablePlot`. |
Figure objects¶Each of the below classes represents a figure object; for brevity inherited methods and attributes are not documented here, please follow links to the parent classes for documentation of available methods and attributes.
gwpy.plotter.Plot(*args, **kwargs)[source]¶Bases: matplotlib.figure.Figure
An extension of the core matplotlib Figure
The Plot provides a number of methods to simplify generating
figures from GWpy data objects, and modifying them on-the-fly in
interactive mode.
add_array(artist, *args, **kwargs)[source]¶Add a Array to this plot
| Parameters: | array :
projection :
ax : newax :
**kwargs
|
|---|---|
| Returns: | artist :
|
add_colorbar(artist, *args, **kwargs)[source]¶Add a colorbar to the current Plot
A colorbar must be associated with an Axes on this Plot,
and an existing mappable element (e.g. an image) (if visible=True).
| Parameters: | mappable : matplotlib data collection
ax :
location :
width :
pad :
log :
label :
clim : pair of
visible :
**kwargs
|
|---|---|
| Returns: | cbar :
|
Examples
>>> import numpy
>>> from gwpy.plotter import Plot
To plot a simple image and add a colorbar:
>>> plot = Plot()
>>> ax = plot.gca()
>>> ax.imshow(numpy.random.randn(120).reshape((10, 12)))
>>> plot.add_colorbar(label='Value')
>>> plot.show()
(png)
add_dataqualityflag(flag, projection=None, ax=None, newax=False, sharex=None, sharey=None, **kwargs)[source]¶Add a DataQualityFlag to this plot
| Parameters: | flag :
projection :
ax : newax :
**kwargs
|
|---|---|
| Returns: | collection :
|
add_frequencyseries(artist, *args, **kwargs)[source]¶Add a FrequencySeries trace to this plot
| Parameters: | spectrum :
ax : newax :
**kwargs
|
|---|---|
| Returns: | line :
|
add_image(artist, *args, **kwargs)[source]¶Add a 2-D image to this plot
| Parameters: | image :
**kwargs
|
|---|---|
| Returns: | image :
|
add_legend(artist, *args, **kwargs)[source]¶Add a legend to this Plot on the most favourable Axes
All non-keyword args and kwargs are passed directly to the
legend() generator
| Returns: | legend :
|
|---|
add_line(artist, *args, **kwargs)[source]¶Add a line to the current plot
| Parameters: | x : array-like
y : array-like
projection :
ax : newax :
**kwargs
|
|---|---|
| Returns: | line :
|
add_scatter(artist, *args, **kwargs)[source]¶Add a set or points to the current plot
| Parameters: | x : array-like
y : array-like
projection :
ax : newax :
**kwargs.
|
|---|---|
| Returns: | collection :
|
add_spectrogram(artist, *args, **kwargs)[source]¶Add a Spectrogram to this plot
| Parameters: | spectrogram :
ax : newax :
**kwargs
|
|---|---|
| Returns: | qm :
|
add_subplot(*args, **kwargs)[source]¶Add a subplot. Examples:
fig.add_subplot(111)
# equivalent but more general
fig.add_subplot(1,1,1)
# add subplot with red background
fig.add_subplot(212, facecolor='r')
# add a polar subplot
fig.add_subplot(111, projection='polar')
# add Subplot instance sub
fig.add_subplot(sub)
kwargs are legal Axes kwargs plus
projection, which chooses a projection type for the axes.
(For backward compatibility, polar=True may also be
provided, which is equivalent to projection=’polar’). Valid
values for projection are: [u’aitoff’, u’hammer’, u’lambert’, u’mollweide’, u’polar’, u’rectilinear’]. Some of
these projections
support additional kwargs, which may be provided to
add_axes().
The Axes instance will be returned.
If the figure already has a subplot with key (args, kwargs) then it will simply make that subplot current and return it.
See also
subplot() for an
explanation of the args.
The following kwargs are supported:
adjustable: [ ‘box’ | ‘datalim’ | ‘box-forced’] agg_filter: unknown alpha: float (0.0 transparent through 1.0 opaque) anchor: unknown animated: [True | False] aspect: unknown autoscale_on: unknown autoscalex_on: unknown autoscaley_on: unknown axes: anAxesinstance axes_locator: unknown axisbelow: [ True | False | ‘line’ ] clip_box: amatplotlib.transforms.Bboxinstance clip_on: [True | False] clip_path: [ (Path,Transform) |Patch| None ] color_cycle: unknown contains: a callable function facecolor: unknown fc: unknown figure: unknown frame_on: [ True | False ] gid: an id string label: string or anything printable with ‘%s’ conversion. navigate: [ True | False ] navigate_mode: unknown path_effects: unknown picker: [None|float|boolean|callable] position: unknown rasterization_zorder: unknown rasterized: [True | False | None] sketch_params: unknown snap: unknown title: unknown transform:Transforminstance url: a url string visible: [True | False] xbound: unknown xlabel: unknown xlim: unknown xmargin: unknown xscale: [u’linear’ | u’log’ | u’logit’ | u’symlog’] xticklabels: sequence of strings xticks: sequence of floats ybound: unknown ylabel: unknown ylim: unknown ymargin: unknown yscale: [u’linear’ | u’log’ | u’logit’ | u’symlog’] yticklabels: sequence of strings yticks: sequence of floats zorder: any number
add_timeseries(artist, *args, **kwargs)[source]¶Add a TimeSeries trace to this plot
| Parameters: | timeseries :
ax : newax :
**kwargs
|
|---|---|
| Returns: | line :
|
get_axes(projection=None)[source]¶Find all Axes, optionally matching the given projection
| Parameters: | projection :
|
|---|---|
| Returns: |
get_title(figure, *args, **kwargs)[source]¶Get an axes title.
Get one of the three available axes titles. The available titles are positioned above the axes in the center, flush with the left edge, and flush with the right edge.
| Parameters: | loc : {‘center’, ‘left’, ‘right’}, str, optional
|
|---|---|
| Returns: | title: str
|
get_xlim(figure, *args, **kwargs)[source]¶Get the x-axis range
| Returns: | xlimits : tuple
|
|---|
Notes
The x-axis may be inverted, in which case the left value will
be greater than the right value.
get_xscale(figure, *args, **kwargs)[source]¶Return the xaxis scale string: linear, log, logit, symlog
get_ylim(figure, *args, **kwargs)[source]¶Get the y-axis range
| Returns: | ylimits : tuple
|
|---|
Notes
The y-axis may be inverted, in which case the bottom value
will be greater than the top value.
get_yscale(figure, *args, **kwargs)[source]¶Return the yaxis scale string: linear, log, logit, symlog
html_map(figure, *args, **kwargs)[source]¶Create an HTML map for some data contained in these Axes
| Parameters: | data :
imagefile :
mapname :
shape :
standalone :
title :
jquery :
|
|---|---|
| Returns: | HTML :
|
logx¶View x-axis in logarithmic scale
logy¶View y-axis in logarithmic scale
save(*args, **kwargs)[source]¶Save the figure to disk.
This method is an alias to savefig(),
all arguments are passed directory to that method.
set_auto_refresh(refresh)[source]¶Set the auto-refresh setting for this Plot.
With auto_refresh set to True, all modifications of the underlying
Axes will trigger the plot to be re-drawn
| Parameters: |
|---|
set_title(artist, *args, **kwargs)[source]¶Set a title for the axes.
Set one of the three available axes titles. The available titles are positioned above the axes in the center, flush with the left edge, and flush with the right edge.
| Parameters: | label : str
fontdict : dict
loc : {‘center’, ‘left’, ‘right’}, str, optional
|
|---|---|
| Returns: | text :
|
| Other Parameters: | |
kwargs : text properties
|
|
set_xlabel(figure, *args, **kwargs)[source]¶Set the label for the xaxis.
| Parameters: | xlabel : string
labelpad : scalar, optional, default: None
|
|---|---|
| Other Parameters: | |
|
|
See also
textset_xlim(artist, *args, **kwargs)[source]¶Set the data limits for the x-axis
| Parameters: | left : scalar, optional
right : scalar, optional
emit : bool, optional
auto : bool or None, optional
xlimits : tuple, optional
|
|---|---|
| Returns: | xlimits : tuple
|
Notes
The left value may be greater than the right value, in which
case the x-axis values will decrease from left to right.
Examples
>>> set_xlim(left, right)
>>> set_xlim((left, right))
>>> left, right = set_xlim(left, right)
One limit may be left unchanged.
>>> set_xlim(right=right_lim)
Limits may be passed in reverse order to flip the direction of
the x-axis. For example, suppose x represents the number of
years before present. The x-axis limits might be set like the
following so 5000 years ago is on the left of the plot and the
present is on the right.
>>> set_xlim(5000, 0)
set_xscale(artist, *args, **kwargs)[source]¶Set the x-axis scale
Set the scaling of the x-axis: u’linear’ | u’log’ | u’logit’ | u’symlog’
ACCEPTS: [u’linear’ | u’log’ | u’logit’ | u’symlog’]
‘linear’
‘log’
- basex/basey:
- The base of the logarithm
- nonposx/nonposy: [‘mask’ | ‘clip’ ]
- non-positive values in x or y can be masked as invalid, or clipped to a very small positive number
- subsx/subsy:
Where to place the subticks between each major tick. Should be a sequence of integers. For example, in a log10 scale:
[2, 3, 4, 5, 6, 7, 8, 9]will place 8 logarithmically spaced minor ticks between each major tick.
‘logit’
- nonpos: [‘mask’ | ‘clip’ ]
- values beyond ]0, 1[ can be masked as invalid, or clipped to a number very close to 0 or 1
‘symlog’
- basex/basey:
- The base of the logarithm
- linthreshx/linthreshy:
- The range (-x, x) within which the plot is linear (to avoid having the plot go to infinity around zero).
- subsx/subsy:
Where to place the subticks between each major tick. Should be a sequence of integers. For example, in a log10 scale:
[2, 3, 4, 5, 6, 7, 8, 9]will place 8 logarithmically spaced minor ticks between each major tick.
- linscalex/linscaley:
- This allows the linear range (-linthresh to linthresh) to be stretched relative to the logarithmic range. Its value is the number of decades to use for each half of the linear range. For example, when linscale == 1.0 (the default), the space used for the positive and negative halves of the linear range will be equal to one decade in the logarithmic range.
set_ylabel(artist, *args, **kwargs)[source]¶Set the label for the yaxis
| Parameters: | ylabel : string
labelpad : scalar, optional, default: None
|
|---|---|
| Other Parameters: | |
|
|
See also
textset_ylim(artist, *args, **kwargs)[source]¶Set the data limits for the y-axis
| Parameters: | bottom : scalar, optional
top : scalar, optional
emit : bool, optional
auto : bool or None, optional
ylimits : tuple, optional
|
|---|---|
| Returns: | ylimits : tuple
|
Notes
The bottom value may be greater than the top value, in which
case the y-axis values will decrease from bottom to top.
Examples
>>> set_ylim(bottom, top)
>>> set_ylim((bottom, top))
>>> bottom, top = set_ylim(bottom, top)
One limit may be left unchanged.
>>> set_ylim(top=top_lim)
Limits may be passed in reverse order to flip the direction of
the y-axis. For example, suppose y represents depth of the
ocean in m. The y-axis limits might be set like the following
so 5000 m depth is at the bottom of the plot and the surface,
0 m, is at the top.
>>> set_ylim(5000, 0)
set_yscale(artist, *args, **kwargs)[source]¶Set the y-axis scale
Set the scaling of the y-axis: u’linear’ | u’log’ | u’logit’ | u’symlog’
ACCEPTS: [u’linear’ | u’log’ | u’logit’ | u’symlog’]
- Different kwargs are accepted, depending on the scale:
- ‘linear’
‘log’
- basex/basey:
- The base of the logarithm
- nonposx/nonposy: [‘mask’ | ‘clip’ ]
- non-positive values in x or y can be masked as invalid, or clipped to a very small positive number
- subsx/subsy:
Where to place the subticks between each major tick. Should be a sequence of integers. For example, in a log10 scale:
[2, 3, 4, 5, 6, 7, 8, 9]will place 8 logarithmically spaced minor ticks between each major tick.
‘logit’
- nonpos: [‘mask’ | ‘clip’ ]
- values beyond ]0, 1[ can be masked as invalid, or clipped to a number very close to 0 or 1
‘symlog’
- basex/basey:
- The base of the logarithm
- linthreshx/linthreshy:
- The range (-x, x) within which the plot is linear (to avoid having the plot go to infinity around zero).
- subsx/subsy:
Where to place the subticks between each major tick. Should be a sequence of integers. For example, in a log10 scale:
[2, 3, 4, 5, 6, 7, 8, 9]will place 8 logarithmically spaced minor ticks between each major tick.
- linscalex/linscaley:
- This allows the linear range (-linthresh to linthresh) to be stretched relative to the logarithmic range. Its value is the number of decades to use for each half of the linear range. For example, when linscale == 1.0 (the default), the space used for the positive and negative halves of the linear range will be equal to one decade in the logarithmic range.
show(block=None, warn=True)[source]¶Display the current figure (if possible)
| Parameters: |
|
|---|
Notes
If blocking is employed, this method calls the
pyplot.show function, otherwise
the show() method of this
Figure is used.
title¶title for the current axes
xlabel¶x-axis label for the current axes
xlim¶x-axis limits for the current axes
ylabel¶y-axis label for the current axes
ylim¶y-axis limits for the current axes
gwpy.plotter.TimeSeriesPlot(*series, **kwargs)[source]¶Bases: gwpy.plotter.series.SeriesPlot
Figure for displaying a TimeSeries.
| Parameters: | *series :
**kwargs
|
|---|
add_state_segments(segments, ax=None, height=0.2, pad=0.1, location='bottom', plotargs={})[source]¶Add a SegmentList to this TimeSeriesPlot indicating state
information about the main Axes data.
By default, segments are displayed in a thin horizontal set of Axes sitting immediately below the x-axis of the main
| Parameters: | segments :
ax :
plotargs
|
|---|
epoch¶The GPS epoch of this plot
gwpy.plotter.FrequencySeriesPlot(*series, **kwargs)[source]¶Bases: gwpy.plotter.series.SeriesPlot
Figure for displaying a FrequencySeries
gwpy.plotter.SpectrogramPlot(*args, **kwargs)[source]¶Bases: gwpy.plotter.timeseries.TimeSeriesPlot
Figure for displaying a Spectrogram.
gwpy.plotter.SegmentPlot(*flags, **kwargs)[source]¶Bases: gwpy.plotter.timeseries.TimeSeriesPlot
Plot for displaying a DataQualityFlag
| Parameters: | *flags :
insetlabels :
**kwargs
|
|---|
add_bitmask(mask, ax=None, width=0.2, pad=0.1, visible=True, axes_class=<class 'gwpy.plotter.segments.SegmentAxes'>, topdown=False, **plotargs)[source]¶Display a state-word bitmask on a new set of Axes.
add_dataqualityflag(flag, **kwargs)[source]¶Add a DataQualityFlag to this plot
| Parameters: | flag :
projection :
ax : newax :
**kwargs
|
|---|---|
| Returns: | collection :
|
gwpy.plotter.EventTablePlot(*args, **kwargs)[source]¶Bases: gwpy.plotter.timeseries.TimeSeriesPlot
Figure for displaying a EventTable
| Parameters: | table :
x :
y :
c :
**kwargs
|
|---|---|
| Returns: | plot :
|
Notes
The form of the returned EventTablePlot is decided at run-time,
rather than when the module was imported.
If tables are passed directly to the constructor, for example:
>>> plot = EventTablePlot(table1, 'time', 'snr')
the columns as given are used to determine the appropriate parent class for the output.
If the input x-column (the first string argument) ends with ‘time’
the output is a child of the TimeSeriesPlot,
allowing easy formatting of GPS times, while if the x-column ends with
‘frequency’, the output comes from the
FrequencySeriesPlot, otherwise the parent is
the core Plot.
add_table(table, x, y, color=None, projection='triggers', ax=None, newax=None, **kwargs)[source]¶Add a Table to this Plot
| Parameters: | table :
x :
y :
c :
projection :
ax : newax :
**kwargs.
|
|---|---|
| Returns: | scatter :
|
See also
EventTableAxes.plot_table()ax and newax for this method.add_tiles(table, x, y, width, height, color=None, anchor='center', projection='triggers', ax=None, newax=None, **kwargs)[source]¶Add a Table to this Plot
| Parameters: | table :
x :
y :
width :
height :
color :
anchor :
projection :
ax : newax :
**kwargs.
|
|---|---|
| Returns: | scatter :
|
See also
EventTableAxes.plot_table()ax and newax for this method.gwpy.plotter.BodePlot(*filters, **kwargs)[source]¶Bases: gwpy.plotter.core.Plot
A Plot class for visualising transfer functions
| Parameters: | *filters : frequencies :
db :
**kwargs |
|---|---|
| Returns: | plot : |
add_filter(filter_, frequencies=None, dB=True, analog=False, sample_rate=None, **kwargs)[source]¶Add a linear time-invariant filter to this BodePlot
| Parameters: |
frequencies :
dB : **kwargs
|
|---|---|
| Returns: |
|
add_frequencyseries(spectrum, dB=True, power=False, **kwargs)[source]¶Plot the magnitude and phase of a complex-valued FrequencySeries
| Parameters: | spectrum :
db :
power :
**kwargs
|
|---|---|
| Returns: |
|
maxes¶FrequencySeriesAxes for the Bode magnitude
paxes¶FrequencySeriesAxes for the Bode phase
Axes objects¶Each of the below classes represents a set of axes on which data are displayed; for brevity inherited methods and attributes are not documented here, please follow links to the parent classes for documentation of available methods and attributes.
gwpy.plotter.Axes(fig, rect, facecolor=None, frameon=True, sharex=None, sharey=None, label=u'', xscale=None, yscale=None, axisbg=None, **kwargs)[source]¶Bases: matplotlib.axes._axes.Axes
An extension of the core matplotlib Axes.
These custom Axes provide only some simpler attribute accessors.
Notes
A new set of Axes should be constructed via:
>>> plot.add_subplots(111, projection='xxx')
where plot is a Plot, and 'xxx'
is the name of the Axes you want to add.
html_map(imagefile, data=None, **kwargs)[source]¶Create an HTML map for some data contained in these Axes
| Parameters: | data :
imagefile :
mapname :
shape :
standalone :
title :
jquery :
|
|---|---|
| Returns: | HTML :
|
resize(artist, *args, **kwargs)[source]¶Set the axes position with:
>>> pos = [left, bottom, width, height]
in relative 0,1 coords, or pos can be a
Bbox
There are two position variables: one which is ultimately
used, but which may be modified by apply_aspect(), and a
second which is the starting point for apply_aspect().
gwpy.plotter.TimeSeriesAxes(*args, **kwargs)[source]¶Bases: gwpy.plotter.series.SeriesAxes
Custom Axes for a TimeSeriesPlot.
auto_gps_scale()[source]¶Automagically set the GPS scale for the time-axis of this plot based on the current view limits
draw(artist, renderer, *args, **kwargs)¶Draw everything (plot lines, axes, labels)
epoch¶Return the current GPS epoch (t=0)
plot(artist, *args, **kwargs)[source]¶Plot data onto these Axes.
| Parameters: | args
kwargs
|
|---|---|
| Returns: | Line2D
|
See also
matplotlib.axes.Axes.plot*args and **kwargsplot_array2d(spectrogram, **kwargs)[source]¶Plot a 2D array onto these axes
| Parameters: | array :
imshow :
norm :
**kwargs
|
|---|---|
| Returns: | layer :
|
See also
matplotlib.axes.Axes.pcolormesh*args and **kwargsplot_series(artist, *args, **kwargs)[source]¶Plot a Series onto these axes
| Parameters: | series :
**kwargs
|
|---|---|
| Returns: | line :
|
See also
matplotlib.axes.Axes.plot*args and **kwargsplot_spectrogram(spectrogram, **kwargs)[source]¶Plot a 2D array onto these axes
| Parameters: | array :
imshow :
norm :
**kwargs
|
|---|---|
| Returns: | layer :
|
See also
matplotlib.axes.Axes.pcolormesh*args and **kwargsplot_timeseries(artist, *args, **kwargs)[source]¶Plot a Series onto these axes
| Parameters: | series :
**kwargs
|
|---|---|
| Returns: | line :
|
See also
matplotlib.axes.Axes.plot*args and **kwargsset_xlim(left=None, right=None, emit=True, auto=False, **kw)[source]¶Set the data limits for the x-axis
| Parameters: | left : scalar, optional
right : scalar, optional
emit : bool, optional
auto : bool or None, optional
xlimits : tuple, optional
|
|---|---|
| Returns: | xlimits : tuple
|
Notes
The left value may be greater than the right value, in which
case the x-axis values will decrease from left to right.
Examples
>>> set_xlim(left, right)
>>> set_xlim((left, right))
>>> left, right = set_xlim(left, right)
One limit may be left unchanged.
>>> set_xlim(right=right_lim)
Limits may be passed in reverse order to flip the direction of
the x-axis. For example, suppose x represents the number of
years before present. The x-axis limits might be set like the
following so 5000 years ago is on the left of the plot and the
present is on the right.
>>> set_xlim(5000, 0)
set_xscale(scale, *args, **kwargs)[source]¶Set the x-axis scale
Set the scaling of the x-axis: u’linear’ | u’log’ | u’logit’ | u’symlog’
ACCEPTS: [u’linear’ | u’log’ | u’logit’ | u’symlog’]
‘linear’
‘log’
- basex/basey:
- The base of the logarithm
- nonposx/nonposy: [‘mask’ | ‘clip’ ]
- non-positive values in x or y can be masked as invalid, or clipped to a very small positive number
- subsx/subsy:
Where to place the subticks between each major tick. Should be a sequence of integers. For example, in a log10 scale:
[2, 3, 4, 5, 6, 7, 8, 9]will place 8 logarithmically spaced minor ticks between each major tick.
‘logit’
- nonpos: [‘mask’ | ‘clip’ ]
- values beyond ]0, 1[ can be masked as invalid, or clipped to a number very close to 0 or 1
‘symlog’
- basex/basey:
- The base of the logarithm
- linthreshx/linthreshy:
- The range (-x, x) within which the plot is linear (to avoid having the plot go to infinity around zero).
- subsx/subsy:
Where to place the subticks between each major tick. Should be a sequence of integers. For example, in a log10 scale:
[2, 3, 4, 5, 6, 7, 8, 9]will place 8 logarithmically spaced minor ticks between each major tick.
- linscalex/linscaley:
- This allows the linear range (-linthresh to linthresh) to be stretched relative to the logarithmic range. Its value is the number of decades to use for each half of the linear range. For example, when linscale == 1.0 (the default), the space used for the positive and negative halves of the linear range will be equal to one decade in the logarithmic range.
gwpy.plotter.FrequencySeriesAxes(*args, **kwargs)[source]¶Bases: gwpy.plotter.series.SeriesAxes
Custom Axes for a FrequencySeriesPlot.
plot(artist, *args, **kwargs)[source]¶Plot data onto these Axes.
| Parameters: | args
kwargs
|
|---|---|
| Returns: | Line2D
|
See also
matplotlib.axes.Axes.plot*args and **kwargsplot_frequencyseries(artist, *args, **kwargs)[source]¶Plot a Series onto these axes
| Parameters: | series :
**kwargs
|
|---|---|
| Returns: | line :
|
See also
matplotlib.axes.Axes.plot*args and **kwargsplot_variance(artist, *args, **kwargs)[source]¶Plot a SpectralVariance onto
these axes
| Parameters: | spectrum : class:
**kwargs
|
|---|---|
| Returns: | mesh :
|
See also
matplotlib.axes.Axes.pcolormesh*args and **kwargsgwpy.plotter.SegmentAxes(*args, **kwargs)[source]¶Bases: gwpy.plotter.timeseries.TimeSeriesAxes
Custom Axes for a SegmentPlot.
This SegmentAxes provides custom methods for displaying any of
DataQualityFlagSegment or glue.segments.segmentSegmentList or glue.segments.segmentlistSegmentListDict or
glue.segments.segmentlistdict| Parameters: | insetlabels :
|
|---|
See also
gwpy.plotter.TimeSeriesAxesbuild_segment(segment, y, height=0.8, valign='center', **kwargs)[source]¶Build a Rectangle to display
a single Segment
| Parameters: | segment :
y :
height :
valign :
**kwargs
|
|---|---|
| Returns: | box :
|
draw(artist, renderer, *args, **kwargs)¶Draw everything (plot lines, axes, labels)
get_collections(ignore=None)[source]¶Return the collections matching the given _ignore value
| Parameters: |
|
|---|---|
| Returns: | collections :
|
get_next_y()[source]¶Find the next y-axis value at which a segment list can be placed
This method simply counts the number of independent segmentlists or flags that have been plotted onto these axes.
insetlabels¶Returns the inset labels state
plot(*args, **kwargs)[source]¶Plot data onto these axes
| Parameters: | args kwargs
|
|---|---|
| Returns: | Line2D
|
See also
matplotlib.axes.Axes.plot()*args` and ``**kwargsplot_dqdict(artist, *args, **kwargs)[source]¶Plot a DataQualityDict onto these axes
| Parameters: | flags :
label :
known :
**kwargs
|
|---|---|
| Returns: | collection :
|
plot_dqflag(artist, *args, **kwargs)[source]¶Plot a DataQualityFlag
onto these axes
| Parameters: | flag :
y :
height :
known :
**kwargs
|
|---|---|
| Returns: | collection :
|
plot_segmentlist(artist, *args, **kwargs)[source]¶Plot a SegmentList onto these axes
| Parameters: | segmentlist :
y :
collection :
label :
**kwargs
|
|---|---|
| Returns: | collection :
|
plot_segmentlistdict(artist, *args, **kwargs)[source]¶Plot a SegmentListDict onto
these axes
| Parameters: | segmentlistdict :
y :
**kwargs
|
|---|---|
| Returns: | collections :
|
set_insetlabels(inset=None)[source]¶Set the labels to be inset or not
| Parameters: |
|
|---|
set_xlim(*args, **kwargs)[source]¶Set the data limits for the x-axis
| Parameters: | left : scalar, optional
right : scalar, optional
emit : bool, optional
auto : bool or None, optional
xlimits : tuple, optional
|
|---|---|
| Returns: | xlimits : tuple
|
Notes
The left value may be greater than the right value, in which
case the x-axis values will decrease from left to right.
Examples
>>> set_xlim(left, right)
>>> set_xlim((left, right))
>>> left, right = set_xlim(left, right)
One limit may be left unchanged.
>>> set_xlim(right=right_lim)
Limits may be passed in reverse order to flip the direction of
the x-axis. For example, suppose x represents the number of
years before present. The x-axis limits might be set like the
following so 5000 years ago is on the left of the plot and the
present is on the right.
>>> set_xlim(5000, 0)
gwpy.plotter.EventTableAxes(fig, *args, **kwargs)[source]¶Bases: gwpy.plotter.timeseries.TimeSeriesAxes
Custom Axes for an ~gwpy.plotter.EventTablePlot`.
The EventTableAxes inherit from ~gwpy.plotter.TimeSeriesAxes`
as a convenience to optionally displaying a time-column.
That choice has no effect on the rest of the Axes functionality.
add_loudest(table, rank, x, y, *columns, **kwargs)[source]¶Display the loudest event according to some rank.
The loudest event is displayed as a gold star at its
position given by the values in columns x, and y,
and those values are displayed in a text box.
| Parameters: | table :
rank :
x :
y :
color :
**kwargs
|
|---|---|
| Returns: | out :
|
plot(*args, **kwargs)[source]¶Plot data onto these axes
| Parameters: | *args
**kwargs
|
|---|
plot_table(table, x, y, color=None, edgecolor='none', size_by=None, size_by_log=None, size_range=None, **kwargs)[source]¶Plot a Table onto these Axes
| Parameters: | table :
x :
y :
color :
**kwargs
|
|---|---|
| Returns: |
|
plot_tiles(table, x, y, width, height, color=None, anchor='center', edgecolors='face', linewidth=0.8, **kwargs)[source]¶Plot a Table onto these Axes using rectangular tiles
| Parameters: | table :
x :
y :
width :
height :
color :
anchor :
**kwargs
|
|---|---|
| Returns: | collection :
|