Classes to plot TimeSeries with matplotlib.
Based on : SubPlot
Defines a subclass of matplotlib.axes.Subplot to plot time series.
A TimeSeries is associated with the plot. This time series is usually specified at the creation of the plot, through the optional parameter series. If no series is given at the creation, the first time series being plotted will be used as associated series.
The associated series is stored in the series attribute. It gives its frequency to the plot. This frequency can be accessed through the attribute freq. All the other series that will be plotted will be first converted to the freq frequency, using their asfreq method.
The same parameters used for the instanciation of a standard matplotlib.axes.Subplot are recognized.
Parameters: | series : {None, TimeSeries}, optional
|
---|
Warning
Attributes
freq |
xdata | DateArray | The array of dates corresponding to the x axis. |
legendsymbols | list | |
legendlabels | list | List of the labels associated with each plot. The first label corresponds to the first plot, the second label to the second plot, and so forth. |
Methods
acorr | |
add_artist | |
add_callback | |
add_collection | |
add_line | |
add_patch | |
add_table | |
add_yaxis | |
annotate | |
apply_aspect | |
arrow | |
autoscale_view | |
axhline | |
axhspan | |
axis | |
axvline | |
axvspan | |
bar | |
barbs | |
barh | |
boxplot | |
broken_barh | |
can_zoom | |
change_geometry | |
cla | |
clabel | |
clear | |
cohere | |
connect | |
contains | |
contains_point | |
contour | |
contourf | |
convert_xunits | |
convert_yunits | |
csd | |
disconnect | |
drag_pan | |
draw | |
draw_artist | |
end_pan | |
errorbar | |
fill | |
fill_between | |
fill_betweenx | |
findobj | |
format_coord | |
format_dateaxis | |
format_xdata | |
format_ydata | |
get_adjustable | |
get_alpha | |
get_anchor | |
get_animated | |
get_aspect | |
get_autoscale_on | |
get_autoscalex_on | |
get_autoscaley_on | |
get_axes | |
get_axes_locator | |
get_axis_bgcolor | |
get_axisbelow | |
get_child_artists | |
get_children | |
get_clip_box | |
get_clip_on | |
get_clip_path | |
get_contains | |
get_cursor_props | |
get_data_ratio | |
get_data_ratio_log | |
get_datelimits | |
get_datelims | |
get_dlim | |
get_figure | |
get_frame | |
get_frame_on | |
get_freq | |
get_geometry | |
get_gid | |
get_images | |
get_label | |
get_legend | |
get_legend_handles_labels | |
get_lines | |
get_navigate | |
get_navigate_mode | |
get_picker | |
get_position | |
get_rasterization_zorder | |
get_rasterized | |
get_renderer_cache | |
get_series | |
get_shared_x_axes | |
get_shared_y_axes | |
get_snap | |
get_tightbbox | |
get_title | |
get_transform | |
get_transformed_clip_path_and_affine | |
get_url | |
get_visible | |
get_window_extent | |
get_xaxis | |
get_xaxis_text1_transform | |
get_xaxis_text2_transform | |
get_xaxis_transform | |
get_xbound | |
get_xgridlines | |
get_xlabel | |
get_xlim | |
get_xmajorticklabels | |
get_xminorticklabels | |
get_xscale | |
get_xticklabels | |
get_xticklines | |
get_xticks | |
get_yaxis | |
get_yaxis_text1_transform | |
get_yaxis_text2_transform | |
get_yaxis_transform | |
get_ybound | |
get_ydata | |
get_ygridlines | |
get_ylabel | |
get_ylim | |
get_ymajorticklabels | |
get_yminorticklabels | |
get_yscale | |
get_yticklabels | |
get_yticklines | |
get_yticks | |
get_zorder | |
grid | |
has_data | |
have_units | |
hexbin | |
hist | |
hitlist | |
hlines | |
hold | |
imshow | |
in_axes | |
invert_xaxis | |
invert_yaxis | |
is_figure_set | |
is_first_col | |
is_first_row | |
is_last_col | |
is_last_row | |
is_transform_set | |
ishold | |
label_outer | |
legend | |
loglog | |
matshow | |
minorticks_off | |
minorticks_on | |
pchanged | |
pcolor | |
pcolorfast | |
pcolormesh | |
pick | |
pickable | |
pie | |
plot | |
plot_date | |
properties | |
psd | |
quiver | |
quiverkey | |
redraw_in_frame | |
relim | |
remove | |
remove_callback | |
reset_datelimits | |
reset_position | |
scatter | |
semilogx | |
semilogy | |
set | |
set_adjustable | |
set_alpha | |
set_anchor | |
set_animated | |
set_aspect | |
set_autoscale_on | |
set_autoscalex_on | |
set_autoscaley_on | |
set_axes | |
set_axes_locator | |
set_axis_bgcolor | |
set_axis_off | |
set_axis_on | |
set_axisbelow | |
set_clip_box | |
set_clip_on | |
set_clip_path | |
set_color_cycle | |
set_contains | |
set_cursor_props | |
set_datelimits | |
set_datelims | |
set_dlim | |
set_figure | |
set_frame_on | |
set_gid | |
set_label | |
set_lod | |
set_navigate | |
set_navigate_mode | |
set_picker | |
set_position | |
set_rasterization_zorder | |
set_rasterized | |
set_series | |
set_snap | |
set_title | |
set_transform | |
set_url | |
set_visible | |
set_xbound | |
set_xlabel | |
set_xlim | |
set_xscale | |
set_xticklabels | |
set_xticks | |
set_ybound | |
set_ydata | |
set_ylabel | |
set_ylim | |
set_yscale | |
set_yticklabels | |
set_yticks | |
set_zorder | |
specgram | |
spy | |
start_pan | |
stem | |
step | |
table | |
text | |
ticklabel_format | |
tsplot | |
twinx | |
twiny | |
update | |
update_datalim | |
update_datalim_bounds | |
update_datalim_numerix | |
update_from | |
update_params | |
vlines | |
xaxis_date | |
xaxis_inverted | |
xcorr | |
yaxis_date | |
yaxis_inverted |
Based on matplotlib.figure.Figure
Create a new Figure object. All the subplots share the same time series.
The same parameters used for the creation of a standard Figure are accepted.
Parameters: | series : {None, TimeSeries}, optional
figsize : {None, tuple}
dpi : {None, int}, optional
facecolor : {None, string}, optional
edgecolor : {None, string}, optional
linewidth : {float, None}
frameon : {True, False}
|
---|
Methods
add_axes | |
add_axobserver | |
add_callback | |
add_subplot | |
add_tsplot | |
autofmt_xdate | |
clear | |
clf | |
colorbar | |
contains | |
convert_xunits | |
convert_yunits | |
delaxes | |
draw | |
draw_artist | |
figimage | |
findobj | |
gca | |
get_alpha | |
get_animated | |
get_axes | |
get_children | |
get_clip_box | |
get_clip_on | |
get_clip_path | |
get_contains | |
get_dpi | |
get_edgecolor | |
get_facecolor | |
get_figheight | |
get_figure | |
get_figwidth | |
get_frameon | |
get_gid | |
get_label | |
get_picker | |
get_rasterized | |
get_size_inches | |
get_snap | |
get_tightbbox | |
get_transform | |
get_transformed_clip_path_and_affine | |
get_url | |
get_visible | |
get_window_extent | |
get_zorder | |
ginput | |
have_units | |
hitlist | |
hold | |
is_figure_set | |
is_transform_set | |
legend | |
pchanged | |
pick | |
pickable | |
properties | |
remove | |
remove_callback | |
savefig | |
sca | |
set | |
set_alpha | |
set_animated | |
set_axes | |
set_canvas | |
set_clip_box | |
set_clip_on | |
set_clip_path | |
set_contains | |
set_dpi | |
set_edgecolor | |
set_facecolor | |
set_figheight | |
set_figsize_inches | |
set_figure | |
set_figwidth | |
set_frameon | |
set_gid | |
set_label | |
set_lod | |
set_picker | |
set_rasterized | |
set_size_inches | |
set_snap | |
set_transform | |
set_url | |
set_visible | |
set_zorder | |
subplots_adjust | |
suptitle | |
text | |
update | |
update_from | |
waitforbuttonpress |
Adds a second y-axis to a TimeSeriesPlot. This function can also be used as a method.
Parameters: | fsp : {None, TimeSeriesPlot}
position : {string}
yscale : {string}
basey : {integer}
subsy : {sequence}
|
---|---|
Raises: | TypeError :
|
Adds a TimeSeriesPlot to the current figure.
Parameters: | args : var
|
---|
Plots the series to the current TimeSeriesPlot. If the current plot is not a TimeSeriesPlot, a new TimeSeriesFigure is created.
Parameters: | series : TimeSeries
args : var
kwargs : var
|
---|
Creates a new TimeSeriesFigure object.
Parameters: | num : {None, int}, optional
figsize : {None, tuple}
dpi : {None, int}, optional
facecolor : {None, string}, optional
edgecolor : {None, string}, optional
frameon : {True, False}
subplotpars : {None, var}
FigureClass : FigureClass
|
---|
Generalizes the matplotlib.Figure.add_subplot method of Figure to generic subplots. The specific Subplot object class to add is given through the keywords SubplotClass or class.
Parameters: | figure_instance : Figure object
args : {var}
kwargs : {Dictionary}
|
---|
Locates the ticks along an axis controlled by a DateArray.
Parameters: | freq : {var}
minor_locator : {False, True}, optional
dynamic_mode : {True, False}, optional
base : {int}, optional quarter : {int}, optional month : {int}, optional day : {int}, optional |
---|
Attributes
axis |
Methods
DummyAxis | |
asmajor | |
asminor | |
autoscale | |
create_dummy_axis | |
pan | |
refresh | |
set_axis | |
set_bounds | |
set_data_interval | |
set_view_interval | |
view_limits | |
zoom |
Formats the ticks along an axis controlled by a DateArray.
Parameters: | freq : {int, string}
minor_locator : {False, True}
dynamic_mode : {True, False}
|
---|
Attributes
axis |
Methods
DummyAxis | |
asmajor | |
asminor | |
create_dummy_axis | |
fix_minus | |
format_data | |
format_data_short | |
get_offset | |
set_axis | |
set_bounds | |
set_data_interval | |
set_locs | |
set_view_interval |
author: | Pierre GF Gerard-Marchant & Matt Knox |
---|---|
contact: | pierregm_at_uga_dot_edu - mattknow_ca_at_hotmail_dot_com |