Table Of Contents

Previous topic

Loading information

This Page

Plotting ENSO information

Classes and functions for plotting ClimateSeries with matplotlib.


ClimateFigure

class ClimateFigure(**kwargs)

Bases: scikits.timeseries.lib.plotlib.TimeSeriesFigure

A subclass of TimeSeriesFigure designe to plot ClimateSeries objects.

Methods

add_axes
add_axobserver
add_callback
add_csplot
add_ensocomparisonplot
add_subplot
add_tsplot
autofmt_xdate
clear
clf
colorbar
contains
convert_xunits
convert_yunits
delaxes
draw
draw_artist
figimage
findobj
gca
get_agg_filter
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_agg_filter
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

ClimateSeriesPlot

class ClimateSeriesPlot(fig=None, *args, **kwargs)

Bases: scikits.timeseries.lib.plotlib.TimeSeriesPlot, object

Defines a subclass of Subplot suitable for plotting ClimateSeries objects.

The subplot can be instantiated using the same keywords as for a standard subplot. A specific keyword series is also recognized, which defines the underlying ClimateSeries.

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
csplot
disconnect
drag_pan
draw
draw_artist
end_pan
errorbar
fill
fill_between
fill_betweenx
findobj
format_coord
format_dateaxis
format_xdata
format_ydata
gca
get_adjustable
get_agg_filter
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
plot_enso_background
properties
psd
quiver
quiverkey
redraw_in_frame
relim
remove
remove_callback
reset_datelimits
reset_position
scatter
semilogx
semilogy
set
set_adjustable
set_agg_filter
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_ensoindicator
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

ENSOPhaseComparisonPlot

class ENSOPhaseComparisonPlot(fig=None, *args, **kwargs)

Bases: matplotlib.axes.AxesSubplot

Class for plotting the comparison of data between ENSO phases.

The object is instantiated with the same optional parameters as for a standard matplotlib.axes.Subplot.

The parameter series must be given to define the series to plot. series must be a ClimateSeries, and an ENSOIndicator must have been allocated. The series will be transformed into an annual series with the periodize function.

Methods

acorr
add_artist
add_callback
add_collection
add_line
add_patch
add_table
annotate
apply_aspect
arrow
autoscale_view
axhline
axhspan
axis
axvline
axvspan
bar
barbs
barh
barplot
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_xaxis
format_xdata
format_ydata
get_adjustable
get_agg_filter
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_figure
get_frame
get_frame_on
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_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_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_position
scatter
semilogx
semilogy
set
set_adjustable
set_agg_filter
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_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_snap
set_title
set_transform
set_url
set_visible
set_xbound
set_xlabel
set_xlim
set_xscale
set_xticklabels
set_xticks
set_ybound
set_ylabel
set_ylim
set_yscale
set_yticklabels
set_yticks
set_zorder
specgram
spy
start_pan
stem
step
table
text
ticklabel_format
twinx
twiny
update
update_datalim
update_datalim_bounds
update_datalim_numerix
update_from
update_params
vlines
whiskerplot
xaxis_date
xaxis_inverted
xcorr
yaxis_date
yaxis_inverted

I nitializes instance.

Parameters:

fig : {None, figure instance}

Figure from which the plot will depend. If None, the current figure is selected.

series : ClimateSeries

Series to convert.

freq : {var}, optional

A valid frequency specifier (as a string or integer), or a 3-letter string corresponding to the first quarter of the year. Use this parameter if the series does not have an adequate frequency.

func : {None,function}, optional

Function controlling how data sharing the same new dates should be manipulated. This function should handle masked values appropriately.

kwargs : dictionary

Dictionary of optional parameters. The same parameters as for a standard subplot instantiation are recognized.

See also

scikits.hydroclimpy.periodize
Function to convert a series into a 2D series with years as rows and periods as columns.

Methods

acorr
add_artist
add_callback
add_collection
add_line
add_patch
add_table
annotate
apply_aspect
arrow
autoscale_view
axhline
axhspan
axis
axvline
axvspan
bar
barbs
barh
barplot
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_xaxis
format_xdata
format_ydata
get_adjustable
get_agg_filter
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_figure
get_frame
get_frame_on
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_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_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_position
scatter
semilogx
semilogy
set
set_adjustable
set_agg_filter
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_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_snap
set_title
set_transform
set_url
set_visible
set_xbound
set_xlabel
set_xlim
set_xscale
set_xticklabels
set_xticks
set_ybound
set_ylabel
set_ylim
set_yscale
set_yticklabels
set_yticks
set_zorder
specgram
spy
start_pan
stem
step
table
text
ticklabel_format
twinx
twiny
update
update_datalim
update_datalim_bounds
update_datalim_numerix
update_from
update_params
vlines
whiskerplot
xaxis_date
xaxis_inverted
xcorr
yaxis_date
yaxis_inverted

Module-wide Data

ENSOcolors

Defines a dictionary storing the color codes corresponding to each ENSO phase.

markers : dictionary
Color codes for matplotlib markers.
lines : dictionary
Color codes for matplotlib lines.
polygons : dictionary
Color codes for matplotlib polygons.
fill : dictionary
Color codes for matplotlib filled areas.
ENSOmarkers

Alias to ENSOcolors['markers'].

  • ‘G’ : Color code corresponding to global data : '#cccccc'
  • ‘C’ : ... to cold (La Niña) episodes:'#6666cc'
  • ‘N’ : ... Neutral episodes :'#669933'
  • ‘W’ : ... to warm (El Niño) episodes :'#ffcc33'
ENSOlines

Alias to ENSOcolors['lines'].

  • ‘G’ : Color code corresponding to global data : '#cccccc'
  • ‘C’ : ... to cold (La Niña) episodes : '#6666cc'
  • ‘N’ : ... to Neutral episodes : '#009900'
  • ‘W’ : ... to warm (El Niño) episodes : '#990000'
ENSOpolygons

Alias to ENSOcolors['polygons'].

  • ‘G’ : Color code corresponding to global data : '#cccccc'.
  • ‘C’ : ... to cold (La Niña) episodes : '#6666cc'
  • ‘N’ : ... to Neutral episodes : '#ffffff'
  • ‘W’ : ... to warm (El Niño) episodes : '#ffcc33'
ENSOfill

Alias to ENSOcolors['fill'].

  • ‘G’ : Color code corresponding to global data : '#cccccc'
  • ‘C’ : ... to cold (La Niña) episodes : '#6666cc'
  • ‘N’ : ... to Neutral episodes : '#669933'
  • ‘W’ : ... to warm (El Niño) episodes : '#ffcc33'
ENSOlabel

Dictionary storing the labels for each ENSO phase

  • 'G' : ‘Global’
  • 'C' : ‘Cold’
  • 'N' : ‘Neutral’
  • 'W' : ‘Warm’