>>Python>Diagram Collection>Documentation>diagram_cl.Diagram
diagram_cl.Diagram

__init__(left = 0.2, bottom = 0.2, right = 0.8, top = 0.8)
The diagram's viewport is drawn on an abstract rectangle without length units. Length dimensions only come into play on rendering. Before, unity indicates the top or right edge, and zero the bottom or left edge. With the optional arguments, the position of the viewport for data rendering (the black rectangle in printout) can be positioned on this drawing area. When rendering, always the dimensions of the underlying drawing area and not of the data viewport are set. Der Sichtbereich des Diagramms wird auf ein abstraktes Rechteck ohne Längeneinheiten gezeichnet. Längendimensionen kommen erst beim Rendern ins Spiel. Davor bedeutet die Einheit die obere oder rechte Kante, und Null die untere oder linke Kante. Mit den optionalen Argumenten kann die Position des Sichtfensters zum Datenrendern (das schwarze Rechteck im Ausdruck) auf dieser Zeichenfläche positioniert werden. Beim Rendern wird immer die Dimension des darunterliegenden Zeichenbereichs angegeben, und nicht die des Datensichtfensters.

add_layer(layer)
Add the layer layer to the layer stack. It will be drawn on top of all other layers. layer is an instance of either diagram_cl.Layer2D or diagram_cl.Layer3D and holds only the data, all rendering is pursued by the Diagram. Note that there is no possibility to remove layers, as I never encountered need for this functionality so far. Fügt den Layer layer zum Layer-Stapel hinzu. Er wird über alle anderen Layer gezeichnet werden. layer ist eine Instanz von entweder diagram_cl.Layer2D oder diagram_cl.Layer3D und enthält ausschließlich die Daten, alles Rendering wird vom Diagram betrieben. Beachten Sie daß es keine Möglichkeit gibt, Layer zu entfernen, da ich nie Notwendigkeit für diese Funktionalität gefunden habe.

set_title(title)
set_xlabel(xlabel)
set_ylabel(ylabel)
Set the respective property. title will be rendered above the top edge of the diagram, xlabel below xticks, and ylabel besides yticks. '\n' is a possibility to indicate line breaks. Exercise care with special symbols as 'ö' and similar. Setzen der entsprechenden Eigenschaft. title wird oberhalb der oberen Kante des Diagramms gerendert werden, xlabel unter den xticks, und ylabel neben den yticks. '\n' ist eine Möglichkeit um Zeilenumbrüche anzuzeigen. Seien Sie vorsichtig mit Sonderzeichen wie 'ö' und Konsorten.

set_xlim((left, right))
set_ylim((bottom, top))
Turns off autoscaling and set the viewport to the given limits. The quantities correspond to their name, i.e., left > right is possible to invert direction of x axis, and similar for y axis. Schaltet Autoscaling aus und setzt das Sichtfenster auf die angegebenen Grenzwerte. Die Größen korrespondieren mit ihrem Namen, d.h. left > right ist möglich um die Richtung der x-Achse aumzukehren, und gleiches für die y-Achse.

get_xlim()
get_ylim()
Retrieval of the tuples (left, right) or (bottom, top). If the limits are changed later, this has the side effect to change also the data contained in the tuple (numpy tuple). Anforderung der Tupel (links, rechts) oder (unten, oben). Wenn die Grenzwerte später geändert werden, hat dies den Seiteneffekt auch die in den Tupeln enthaltenen Daten zu ändern (numpy-Tupel).

set_autoscale_on(autoscale_on)
Sets the autoscale mode on, if True is supplied. If the autoscale mode is turned off, the limits will be maintained as they are in the moment. Setzt den Autoskalierungs-Modul an, wenn True angegeben wird. Wenn der Modus abgeschaltet wird, werden die Grenzwerte so beibehalten werden wie sie im Moment sind.

clear()
Clear the diagram. Clears limits, sets autoscaling on, and clears layer stack. The diagram will be left in a state similar to initialisation state. Löscht den Inhalt des Diagramms. Löscht Grenzwerte, setzt Autoskalierung an, und leert den Layerstapel. Das Diagramm wird in einem Zustand ähnlich dem nach Initialisierung hinterlassen werden.

render()
Less often needed, only for workarounds. This function turns data into plot instructions in matplotlib. Wenig oft benötigt, nur für Workarounds. Diese Funktion wandelt in matplotlib Daten in Plot-Anweisungen um.

render_to_image(shape)
Renders a PIL image of extent shape = (x, y), and returns the image. If PIL could not be loaded on module startup, this function will fail. Rendert ein PIL-Bild des Ausmaßes shape = (x, y), und gibt das Bild zurück. Wenn PIL beim Start des Moduls nicht geladen werden konnte, wird diese Funktion fehlschlagen.

render_to_eps(shape, outfile)
Renders to an EPS file outfile with extent shape = (x, y) in inches. This function is always available. Rendert zu einer EPS-Datei outfile mit Ausamß shape = (x, y) in Inch. Diese Funktion ist immer verfügbar.

render_to_ps = render_to_eps
Deprecated and kept only for backward compatibility. It will render EPS too. Veraltet und nur für Rückwärtskompatibiltät beibehalten. Sie wird ebenfalls EPS rendern.


Maintained since: 10/09
$Last changed: 10/09$

Impressum/Contact