phystricks
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
phystricks.src.Picture.Picture Class Reference
Inheritance diagram for phystricks.src.Picture.Picture:
Inheritance graph
[legend]
Collaboration diagram for phystricks.src.Picture.Picture:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, name="CAN_BE_A_PROBLEM_IF_TRY_TO_PRODUCE_EPS_OR_PDF")
 
def tikz_code (self)
 
def visual_xsize (self)
 
def visual_ysize (self)
 
def create_latex_code (self, language=None, pspict=None)
 
def test_dilatation_first (self, fact)
 
def dilatation (self, fact)
 
def dilatation_X (self, fact)
 
def dilatation_Y (self, fact)
 
def rotation (self, angle)
 
def fixe_tailleX (self, l)
 
def fixe_tailleY (self, l)
 
def AddPoint (self, P)
 
def math_bounding_box (self, pspict=None)
 
def bounding_box (self, pspict=None)
 
def DrawBoundingBox (self, obj=None, color="cyan")
 
def deal_with_graph (self, gr, separator_name)
 
def DrawGraphs (self, args, arg)
 
def DrawDefaultAxes (self)
 
def DrawDefaultGrid (self)
 
def get_box_size (self, tex_expression, default_value="0pt")
 
def add_latex_line (self, ligne, separator_name="DEFAULT", add_line_jump=True)
 
def force_math_bounding_box (self, g)
 
def test_if_test_file_is_present (self)
 
def latex_code (self)
 

Public Attributes

 name
 
 comment
 
 tikzfilename
 
 mother
 
 figure_mother
 
 language
 
 pstricks_code_list
 
 newwriteDone
 
 record_marks
 
 record_bounding_box
 
 record_draw_graph
 
 record_draw_bb
 
 record_force_math_bounding_box
 
 counterDone
 
 newlengthDone
 
 listePoint
 
 xunit
 
 yunit
 
 rotation_angle
 
 LabelSep
 
 BB
 
 math_BB
 
 axes
 
 single_axeX
 
 single_axeY
 
 draw_default_axes
 
 mx_acceptable_BB
 
 my_acceptable_BB
 
 Mx_acceptable_BB
 
 My_acceptable_BB
 
 grid
 
 separator_list
 
 auxiliary_file
 
 xsize
 
 ysize
 

Private Member Functions

def _DrawGraph (self, graph, separator_name=None)
 

Private Attributes

 _bounding_box
 

Constructor & Destructor Documentation

def phystricks.src.Picture.Picture.__init__ (   self,
  name = "CAN_BE_A_PROBLEM_IF_TRY_TO_PRODUCE_EPS_OR_PDF" 
)

Member Function Documentation

def phystricks.src.Picture.Picture._DrawGraph (   self,
  graph,
  separator_name = None 
)
private
Draw an object of type `<Something>Graph`.

More generally, it can draw anything that has the methods

    1. bounding_box
    2. tikz_code

The first one should return a bounding box and the second one should return a valid tikz code as string.

NOTE:

More precisely, it does not draw the object now, but it add it (and its mark if applicable) to ``self.record_draw_graph`` which is the list of objects to be drawn. Thus it is still possible to modify the object later (even if extremely discouraged).
def phystricks.src.Picture.Picture.add_latex_line (   self,
  ligne,
  separator_name = "DEFAULT",
  add_line_jump = True 
)
Add a line in the pstricks code. The optional argument <position> is the name of a marker like %GRID, %AXES, ...
def phystricks.src.Picture.Picture.AddPoint (   self,
  P 
)
def phystricks.src.Picture.Picture.bounding_box (   self,
  pspict = None 
)
Update and return the bounding box of the picture.
def phystricks.src.Picture.Picture.create_latex_code (   self,
  language = None,
  pspict = None 
)
Fix the bounding box and create the separator "PSTRICKS CODE".

NOTES :

- This function is not supposed to be used twice. In fact, this is
  supposed to be called only from `lazy_attributes`
def phystricks.src.Picture.Picture.deal_with_graph (   self,
  gr,
  separator_name 
)
def phystricks.src.Picture.Picture.dilatation (   self,
  fact 
)
def phystricks.src.Picture.Picture.dilatation_X (   self,
  fact 
)
def phystricks.src.Picture.Picture.dilatation_Y (   self,
  fact 
)
def phystricks.src.Picture.Picture.DrawBoundingBox (   self,
  obj = None,
  color = "cyan" 
)
Draw the bounding box of an object when it has a method bounding_box

If not, assume that the object is the bounding box to be drawn.
If no object are given, draw its own bounding box
def phystricks.src.Picture.Picture.DrawDefaultAxes (   self)
This function computes the bounding box of the axes and add
them to the list to be drawn.

The length of the axes is computed here (via self.math_bounding_box).

Sometimes you want the axes to be slightly larger. You can impose 
the length of the axes.
def phystricks.src.Picture.Picture.DrawDefaultGrid (   self)
def phystricks.src.Picture.Picture.DrawGraphs (   self,
  args,
  arg 
)
The function DrawGraphs basically takes a list of objects and performs
different kind of operation following the type of each "object" :

If the object it iterable, its elements are re-passed to DrawGraphs
If the object is an instance of "ObjectGraph", it is passed to
_DrawGraph
If the object is 'AddedObject', the list corresponding to 'self' is
re-passed to DrawGraphs.
def phystricks.src.Picture.Picture.fixe_tailleX (   self,
  l 
)
def phystricks.src.Picture.Picture.fixe_tailleY (   self,
  l 
)
def phystricks.src.Picture.Picture.force_math_bounding_box (   self,
  g 
)
Add an object to the math bounding box of the pspicture. This object will not be drawn, but the axes and the grid will take it into account.
def phystricks.src.Picture.Picture.get_box_size (   self,
  tex_expression,
  default_value = "0pt" 
)
def phystricks.src.Picture.Picture.latex_code (   self)
def phystricks.src.Picture.Picture.math_bounding_box (   self,
  pspict = None 
)
Update and return the math bounding box of the picture.
def phystricks.src.Picture.Picture.rotation (   self,
  angle 
)
def phystricks.src.Picture.Picture.test_dilatation_first (   self,
  fact 
)
Return True if nothing is already done on the picture.

The dilatation has to be the first information given to a pictute. The aim of this function is to raise an exception when one tries to use
pspict.dilatation(...)
after having used 'DrawGraphs'
def phystricks.src.Picture.Picture.test_if_test_file_is_present (   self)
def phystricks.src.Picture.Picture.tikz_code (   self)
It also remove the tikz externalize file.
def phystricks.src.Picture.Picture.visual_xsize (   self)
def phystricks.src.Picture.Picture.visual_ysize (   self)

Member Data Documentation

phystricks.src.Picture.Picture._bounding_box
private
phystricks.src.Picture.Picture.auxiliary_file
phystricks.src.Picture.Picture.axes
phystricks.src.Picture.Picture.BB
phystricks.src.Picture.Picture.comment
phystricks.src.Picture.Picture.counterDone
phystricks.src.Picture.Picture.draw_default_axes
phystricks.src.Picture.Picture.figure_mother
phystricks.src.Picture.Picture.grid
phystricks.src.Picture.Picture.LabelSep
phystricks.src.Picture.Picture.language
phystricks.src.Picture.Picture.listePoint
phystricks.src.Picture.Picture.math_BB
phystricks.src.Picture.Picture.mother
phystricks.src.Picture.Picture.mx_acceptable_BB
phystricks.src.Picture.Picture.Mx_acceptable_BB
phystricks.src.Picture.Picture.my_acceptable_BB
phystricks.src.Picture.Picture.My_acceptable_BB
phystricks.src.Picture.Picture.name
phystricks.src.Picture.Picture.newlengthDone
phystricks.src.Picture.Picture.newwriteDone
phystricks.src.Picture.Picture.pstricks_code_list
phystricks.src.Picture.Picture.record_bounding_box
phystricks.src.Picture.Picture.record_draw_bb
phystricks.src.Picture.Picture.record_draw_graph
phystricks.src.Picture.Picture.record_force_math_bounding_box
phystricks.src.Picture.Picture.record_marks
phystricks.src.Picture.Picture.rotation_angle
phystricks.src.Picture.Picture.separator_list
phystricks.src.Picture.Picture.single_axeX
phystricks.src.Picture.Picture.single_axeY
phystricks.src.Picture.Picture.tikzfilename
phystricks.src.Picture.Picture.xsize
phystricks.src.Picture.Picture.xunit
phystricks.src.Picture.Picture.ysize
phystricks.src.Picture.Picture.yunit

The documentation for this class was generated from the following file: