[back]
Plotter |
Various GUI engines
PAIDA has three plotting engines.
By default, PAIDA will select a porper GUI engine automatically depending on your environment.
Environment
|
GUI engine
|
If you use Jython |
swing
|
Else if you have Tkinter |
tkinter
|
Else |
batch
|
You can select explicitly by typing
batch | python yourscript.py --gui=batch |
tkinter | python yourscript.py --gui=tkinter |
swing | python yourscript.py --gui=swing |
or inside your script
(currently, the following lines must be placed before any of the lines using PAIDA module)
import paida.paida_gui.PGuiSelector |
Various image formats
Various image formats are supported.
Type | Description | Supported Image Format | ||||
PS | EPS | JPEG | GIF | PNG | ||
batch | plots nothing | - | - | - | - | - |
tkinter | Tkinter GUI | o | o | - | - | - |
swing | Swing GUI | - | - | o | o | o |
More about PS and EPS formats.
Format | Description | |
PS | Multiple pages without size | One new page per writeToFile() call |
EPS | Single figure with size | Overwritten by second call |
How to create multiple pages in PS file
Every time you call
plotter.writeToFile('filename.ps') / plotter.writeToFile('filename.ps', 'PS'),
one new page will be added.
Plotter window size/direction
The plotter window size and direction can be changed by
plotter.setParameter('paper', 'A5')
plotter.setParameter('portrait', 'False')
See also "A plotter itself has some parameters".
Various styles
A plotter can plot analysis objects in various styles by using plotterStyles.
A plotterStyle has child style information and every style has some parameters.
plotterStyle = plotter.style()
or
plotterStyle = plotterFactory.createPlotterStyle()
infoStyle plotterStyle | ||
parameter name | default value | available values / comments |
textStyle
|
returns ITextStyle instance
|
|
lineStyle
|
returns ILineStyle instance
|
|
fillStyle
|
returns IFillStyle instance
|
titleStyle plotterStyle | ||
parameter name | default value | available values / comments |
textStyle
|
returns ITextStyle instance
|
A plotter itself has some parameters.
plotter | ||
parameter name | default value | available values / comments |
paper | 'A4' | 'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'B0', 'B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'Letter', 'Legal', 'Tabloid', 'Hagaki' |
landscape | 'True' | 'True', 'true', 'False', 'false', True, False |
width | paper size's width | any size value - '10' 10 pixels - '10c' 10 centimeters - '10i' 10 inches - '10m' 10 millimeters - '10p' 10 printer's points |
height | paper size's height | any size value |
viewWidth | the same as width | any size value |
viewHeight | the same as height | any size value |
swap | width <-> height |
A plotterLayout has some parameters.
plotterLayout | ||
parameter name | default value | available values / comments |
statisticsBoxAnchor | 'NE' | 'N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW' |
statisticsBoxOffsetX | '0p' | any position value - '10' 10 pixels - '10c' 10 centimeters - '10i' 10 inches - '10m' 10 millimeters - '10p' 10 printer's points |
statisticsBoxOffsetY | '0p' | any position value |
legendsBoxAnchor | 'NW' | 'N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW' |
legendsBoxOffsetX | '0p' | any position value |
legendsBoxOffsetY | '0p' | any position value |
textsBoxAnchor | 'NE' | 'N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW' |
textsBoxOffsetY | '0p' | any position value |
textsBoxOffsetY | '0p' | any position value |
3D rotated plot
From 3.2.1_2.9, PAIDA can plot 3D rotated objects by specifing one of the two parameters in IPlotterStyle:
default
|
|
rotationRatio | '[2.0, 4.0]' |
rotationAxis | '[None, None, None, None, False]' |
If both of them are specified, 'rotationAxis' is neglected.
rotationRatio : [Yy/Xy, Zy/Xy]
List type parameter
This is convenient when you want to keep Z axis vertical.
rotationAxis : [Vx, Vy, Vz, angle, boolSquare = False]
List type parameter
This is the rotation around a vector (Vx, Vy, Vz). The "angle" is the rotation angle in radian (counterclockwise). The last parameter "boolSquare" is omittable. If set to True, the plot is forced to be inside a square area.
The camera is set perpendicular to the XY-plane ((0, 0, -1) direction).
Memo : Currently the tick labels may be sometimes displayed too close to the axis lines depending on the parameter values.
Time scaling
Also supports time scaling.
[back]