Element: PlottingPanel.
Icon:
Text: A 2D drawing panel with a system of axes.
Description: A PlottingPanel is a 2D drawing panel that provides, by default, a system of coordinate axes.
Plotting panels are interactive and respond to user interaction in the same way as drawing panels.
Table of properties |
||
Name | Description | Values accepted |
Decoration and Axes | ||
Title | The title displayed at the top of the panel. | A constant or variable of type String. |
Tt Font | The font for the title. | See values accepted by the Font property. |
Axes Type | The type of axes displayed. There are three types of cartesian axes and two types of polar axes. | One of the constants: Cartesian1, Cartesian2, Cartesian3, Polar1, Polar2. |
Title X | The title displayed on the X axis. | A constant or variable of type String. |
X Axis Pos | The preferred position of the X axis. (Some axes types ignore this value.) | A constant or variable of type double. |
X Axis Type | Linear or logarithmic (base 10). | One of the constants: LINEAR, LOG10. |
Grid X | Whether to draw a grid in the X axis. | A boolean variable or one of the constants true or false. |
Title Y | The title displayed on the Y axis. | A constant or variable of type String. |
Y Axis Pos | The preferred position of the Y axis. (Some axes types ignore this value.) | A constant or variable of type double. |
Y Axis Type | Linear or logarithmic ( base 10). | One of the constants: LINEAR, LOG10. |
Grid Y | Whether to draw a grid in the Y axis. | A boolean variable or one of the constants true or false. |
Delta R | The increment between lines ro=constant in the case of polar axes. | A constant or variable of type double. |
Delta Theta | The increment between lines theta=constant in the case of polar axes. | A constant or variable of type double. |
Scales |
||
Autoscale X | Whether to automatically compute the scale in the X axis. | A boolean variable or one of the constants true or false. |
Autoscale Y | Whether to automatically compute the scale in the Y axis. | A boolean variable or one of the constants true or false. |
Minimum X | The smallest value of the X coordinate that is visible in the panel. | A constant or variable of type double. |
Maximum X | The greatest value of the X coordinate that is visible in the panel. | A constant or variable of type double. |
Minimum Y | The smallest value of the Y coordinate that is visible in the panel. | A constant or variable of type double. |
Maximum Y | The greatest value of the Y coordinate that is visible in the panel. | A constant or variable of type double. |
Interaction | ||
X | The X coordinate of the position of the mouse. | A variable of type double. |
Y | The Y coordinate of the position of the mouse. | A variable of type double. |
On Press | The action to invoke when the mouse is pressed on the panel. | The Java code to invoke for the action. |
On Drag | The action to invoke when the mouse is dragged on the panel. | The Java code to invoke for the action. |
On Release | The action to invoke when the mouse is released on the panel. | The Java code to invoke for the action. |
Mouse Enter | The action to invoke when the pointer enters the element. | The Java code to invoke for the action. |
Mouse Exit | The action to invoke when the pointer leaves the element. | The Java code to invoke for the action. |
Key Action | The action to invoke when any key is hit while the panel has focus. | The Java code to invoke for the action. |
Key Pressed | The integer code of the key pressed. | A variable of type int. |
Configuration |
||
Square | Whether to keep a 1:1 ratio between the X and Y scales. | A boolean variable or one of the constants true or false. |
Gutters | The empty spaces to leave around the drawing area of the panel. | An Object variable of the class java.awt.Rectangle or four integers, separated by commas, corresponding to the top, left, bottom and right margins, respectively. |
Coordinates | Whether to display the current coordinates of the mouse when the user clicks on the panel. | A boolean variable or one of the constants true or false. |
X Format | The format for the visualization of the X coordinate. | Any value acepted by the class java.text.DecimalFormat. See additional info. Default is "x=0.000". |
Y Format | The format for the visualization of the Y coordinate. | Any value acepted by the class java.text.DecimalFormat. See additional info. Default is "y=0.000". |
Graphical Aspect |
||
Visible | The visibility of the element. | A boolean variable or one of the constants true or false. |
Size | The size of the element. | An Object variable of the class java.awt.Dimension or the integer values for the width and the height, respectively, separated by a comma. |
Interior | The color used to display the interior drawing area. | See the values for the Background property. |
Background | The color used for the background of the element and that of its children (unless they explicitely set their own value for this property). | An Object variable of the class java.awt.Color
or one of the predefined colors: black,
blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink,
red, white, yellow.
A color can also be specified providing its integer RGB coordinates (between 0 and 255), plus an optional transparency coordinate. The default value is decided by the system. |
Foreground | The color used for any text displayed by the element or by its children (unless they explicitely set their own value for this property). | See the values for the Background property. |
Font | The font used for any text displayed by the element or by its children (unless they explicitely set their own value for this property). | An Object variable of the class java.awt.Font
or a set of family, style and size, separated by commas. The style
must be one of plain,
bold, italic, bold | italic. Example: Monospaced,italic,18.
The default value is decided by the system. |
Tooltip | The text displayed when the cursor lingers on top of the element. | Any constant or variable of type String. |