Package sage :: Package plot :: Module axes :: Class Axes
[hide private]
[frames] | no frames]

Class Axes

source code

                      object --+    
                               |    
structure.sage_object.SageObject --+
                                   |
                                  Axes


Axes for SAGE 2D Graphics.

Set all axis properties and then add one of 
the following axes to the current (matplotlib) subplot:
add_xy__axes
add_xy_frame_axes
add_xy_matrix_frame_axes



Instance Methods [hide private]
 
__init__(self, color=(0, 0, 0), fontsize=8, linewidth=0.6, axes_labels=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a..., axes_label_color=(0, 0, 0), tick_label_color=(0, 0, 0))
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_tasteful_ticks(self, minval, maxval)
This function finds spacing for axes tick marks that are well spaced.
source code
 
_in_range(self, v, minval, maxval)
find axis values set in a given range
source code
 
_trunc(self, x, digits_before_the_decimal) source code
 
_format_tick_string(self, s) source code
 
_tasteless_ticks(self, minval, maxval, num_pieces) source code
 
_find_axes(self, minval, maxval)
Try to find axis tick positions that are well spaced
source code
 
_draw_axes(self, subplot, axes, xmin, xmax, ymin, ymax, x_axis_ypos, y_axis_xpos) source code
 
_draw_axes_labels(self, subplot, axes_labels, xmin, xmax, ymin, ymax, xstep, ystep, x_axis_ypos, y_axis_xpos, pad=0.2) source code
 
add_xy_axes(self, subplot, xmin, xmax, ymin, ymax, axes=True, ticks='automatic', axesstyle='automatic', axes_labels=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)
\code{_add_xy_axes} is used when the 'save' method of any Graphics object is called.
source code
 
_draw_frame(self, subplot, xmins, xmaxs, ymins, ymaxs)
Draw a frame around a graphic at the given (scaled out) x and y min and max values.
source code
 
add_xy_frame_axes(self, subplot, xmin, xmax, ymin, ymax, axes_with_no_ticks=False, axes_labels=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)
Draw a frame around the perimeter of a graphic.
source code
 
add_xy_matrix_frame_axes(self, subplot, xmin, xmax, ymin, ymax)
Draw a frame around a \code{matrix_plot}.
source code

Inherited from structure.sage_object.SageObject: __hash__, __new__, __repr__, _axiom_, _axiom_init_, _gap_, _gap_init_, _gp_, _gp_init_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _kash_init_, _macaulay2_, _macaulay2_init_, _magma_, _magma_init_, _maple_, _maple_init_, _mathematica_, _mathematica_init_, _maxima_, _maxima_init_, _octave_, _octave_init_, _pari_, _pari_init_, _r_init_, _sage_, _singular_, _singular_init_, category, db, dump, dumps, plot, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, color=(0, 0, 0), fontsize=8, linewidth=0.6, axes_labels=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a..., axes_label_color=(0, 0, 0), tick_label_color=(0, 0, 0))
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

_tasteful_ticks(self, minval, maxval)

source code 

This function finds spacing for axes tick marks that are well spaced.
Were 'well spaced' means for any given min and max values
the tick spacing should look even and visually nice (tasteful).

add_xy_axes(self, subplot, xmin, xmax, ymin, ymax, axes=True, ticks='automatic', axesstyle='automatic', axes_labels=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)

source code 

\code{_add_xy_axes} is used when the 'save' method
of any Graphics object is called.

Additionally this function uses the function '_find_axes' 
from axis.py which attempts to find aesthetically pleasing
tick and label spacing values.

Some definitons of the parameters:

y_axis_xpos : "where on the x-axis to draw the y-axis"
xstep : "the spacing between major tick marks"
xtslminor : "x-axis minor tick step list" 
xtslmajor : "x-axis major tick step list" 
yltheight : "where the top of the major ticks go" 
ystheight : "where the top of the minor ticks go" 
ylabel : "where the ylabel is drawn" 
xlabel : "where the xlabel is drawn" 

add_xy_frame_axes(self, subplot, xmin, xmax, ymin, ymax, axes_with_no_ticks=False, axes_labels=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)

source code 

Draw a frame around the perimeter of a graphic.

Only major tick marks are drawn on a frame axes.

If \code{axes_with_no_ticks} is true, then also draw 
centered axes with no tick marks.

add_xy_matrix_frame_axes(self, subplot, xmin, xmax, ymin, ymax)

source code 

Draw a frame around a \code{matrix_plot}.

The tick marks drawn on the frame correspond to
the ith row and jth column of the matrix.