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

Class GraphicPrimitive

source code

                      object --+    
                               |    
structure.sage_object.SageObject --+
                                   |
                                  GraphicPrimitive
Known Subclasses:
GraphicPrimitive_Arrow, GraphicPrimitive_BarChart, GraphicPrimitive_Circle, GraphicPrimitive_ContourPlot, GraphicPrimitive_Disk, GraphicPrimitive_Line, GraphicPrimitive_MatrixPlot, GraphicPrimitive_NetworkXGraph, GraphicPrimitive_PlotField, GraphicPrimitive_Point, GraphicPrimitive_Polygon, GraphicPrimitive_Text


Base class for graphics primitives, e.g., things that knows how to draw
themselves in 2d.

EXAMPLES:
We create an object that derives from GraphicPrimitive:
    sage: P = line([(-1,-2), (3,5)])
    sage: P[0]
    Line defined by 2 points
    sage: type(P[0])
    <class 'sage.plot.plot.GraphicPrimitive_Line'>



Instance Methods [hide private]
 
__init__(self, options)
Create a base class GraphicsPrimitive.
source code
 
_allowed_options(self)
Return the allowed options for a graphics primitive.
source code
 
plot3d(self, **kwds) source code
 
_plot3d_options(self, options=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)
Translate 2d plot options into 3d plot options.
source code
 
options(self)
Return the dictionary of options for this graphics primitive.
source code
 
_repr_(self)
String representation of this graphics primitive.
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, options)
(Constructor)

source code 

Create a base class GraphicsPrimitive.  All this does is
set the options.

EXAMPLES:
We indirectly test this function.
    sage: from sage.plot.plot import GraphicPrimitive
    sage: GraphicPrimitive({})
    Graphics primitive

Overrides: object.__init__

_allowed_options(self)

source code 

Return the allowed options for a graphics primitive.

OUTPUT:
    -- a reference to a dictionary.

EXAMPLES:
    sage: from sage.plot.plot import GraphicPrimitive
    sage: GraphicPrimitive({})._allowed_options()
    {}

options(self)

source code 

Return the dictionary of options for this graphics primitive.

By default this function verifies that the options are all
valid; if any aren't a verbose message is printed with level 0.

EXAMPLES:
    sage: from sage.plot.plot import GraphicPrimitive
    sage: GraphicPrimitive({}).options()
    {}

_repr_(self)

source code 

String representation of this graphics primitive.

EXAMPLES:
    sage: from sage.plot.plot import GraphicPrimitive
    sage: GraphicPrimitive({})._repr_()
    'Graphics primitive'