Std New Graph: Difference between revisions
No edit summary |
No edit summary |
||
Line 28: | Line 28: | ||
==Note== | ==Note== | ||
It creates a new (empty) graph. | It creates a new (empty) graph. A 2D graph window displays the plot(s) and interacts with the user. The window has a canvas at its heart which is basically a background on which everything is drawn. one can add layout elements to the blank canvas which is the basic unit of a graph. A canvas can have an arbitrary number of child layout elements arranged in a grid fashion. The grid contains rows and columns to which layout elements can be added. Please see examples of 2D graph [[Meteorites_Data|here]] and [[Sine_Curve|here]]. | ||
=Window= | |||
Graph2D windows typically shows layout order on top left side, layout management buttons on top right side and the plot in the center of the window | |||
[[File:Graph2d_multilayout.png|center]] | |||
A Graph2D window item contains the following mutable properties: | |||
{| class="wikitable" style="float:left;clear:left;width:100%" | |||
!colspan="2"|Graph2D Properties | |||
|- | |||
|<pre style="color: green;margin:5px;padding:5px">Name</pre> | |||
|Sets a name for the window which is unique consisting of alphabets and numbers. No two window can have same name or symbols in their name(s). | |||
|- | |||
|<pre style="color: green;margin:5px;padding:5px">Label</pre> | |||
|Sets the descriptive text for the window contents. | |||
|- | |||
|<pre style="color: green;margin:5px;padding:5px">Geometry</pre> | |||
|This sets the geometry of the widow relative to its parent including any window frame. | |||
''<strong>Note:</strong> for exporting the graph with a desired width and height, we recommend setting Plot Dimension property in Canvas section.'' | |||
|} | |||
Graph2D windows are linked to their tanble/matrix data source(s). Removal of data sources automatically reflect the contents. | |||
=Canvas= | |||
The canvas is the area in which everything is drawn. | |||
{| class="wikitable" style="float:left;clear:left;background-color:#ffffcc;width:100%" | |||
!colspan="2"|Canvas Properties | |||
|- | |||
|<pre style="color: green;background-color:#ffffcc;margin:5px;padding:5px">Plot Dimension</pre> | |||
|The plot dimension is the area in which the plot is drawn. All mechanisms, e.g. margin calculation take the dimension to be the outer border of the plot. The dimention normally is the rect width and height of the canvas, i.e. a rect with top left (0, 0) and size of the canvas. | |||
|- | |||
|<pre style="color: green;background-color:#ffffcc;margin:5px;padding:5px">Background Color</pre> | |||
|Before drawing everything else, the background is filled with the selected color brush. For graphs with transparent background, set the color alpha level to 0; | |||
|- | |||
|<pre style="color: green;background-color:#ffffcc;margin:5px;padding:5px">Divice Pixel Ratio</pre> | |||
|Sets the device pixel ratio used by the paint buffers of this Graph2D instance. | |||
Normally, this doesn't need to be set manually, because it is initialized with the regular PixelRatio which is configured by Qt to fit the display device (e.g. 1 for normal displays, 2 for High-DPI displays). | |||
|- | |||
|<pre style="color: green;background-color:#ffffcc;margin:5px;padding:5px">OpenGL</pre> | |||
|This method allows to enable OpenGL plot rendering, for increased plotting performance of graphically demanding plots (thick lines, translucent fills, etc.). If enabled is set to true, LabRPS will try to initialize OpenGL and, if successful, continue plotting with hardware acceleration. If the OpenGL initialization fails, rendering continues with the regular software rasterizer. | |||
''<strong>Warning</strong>: | |||
This is still an experimental feature and its performance depends on the system that it runs on. Having multiple LabRPS Graph2D items in one application with enabled OpenGL rendering might cause context conflicts on some systems.'' | |||
|- | |||
|<pre style="color: green;background-color:#ffffcc;margin:5px;padding:5px">Row Spacing</pre> | |||
|Sets the gap that is left blank between layout elements arranged in rows. | |||
|- | |||
|<pre style="color: green;background-color:#ffffcc;margin:5px;padding:5px">Column Spacing</pre> | |||
|Sets the gap that is left blank between layout elements arranged in columns. | |||
|} | |||
canvas represents the lowest layer of all LabRPS graphs. | |||
=Layout= | |||
An layout element is typically an area enclosed on all sides with an arbitrary number of axes, where the graphs/potables are drawn in. It defines the rectangular bounding of child elements like Axes, plot(s), Legend(s), item()s etc (equivalent to a layer in SciDavis, QtiPlot, or Origin). Layout elements don't draw anything themselves but act as a container holding child elements. By default, Layout elements come with two axes, at the bottom and left. | |||
[[File:Layout_element.png|center]] | |||
The number of buttons on the left top side represents the number of layout elements in the plot window (1,1 and 1,2). Each element is represented as a row,column fashion inside the buttons. The active layout is marked by the red highlight around the layout button and the red triangle at the top right corner of the active layout element. Active layout elements can be changed either by clicking the layout element or by clicking the layout element button or by clicking the respective layout element in the property browser windows object browser pane. | |||
{| class="wikitable" style="float:left;clear:left;width:100%" | |||
!colspan="2"|Layout Properties | |||
|- | |||
|<pre style="color: green;margin:5px;padding:5px">Background Color</pre> | |||
|Sets a name for the window which is unique consisting of alphabets and numbers. No two window can have same name or symbols in their name(s). | |||
|- | |||
|<pre style="color: green;margin:5px;padding:5px">Fill Style</pre> | |||
|Sets the descriptive text for the window contents. | |||
|- | |||
|<pre style="color: green;margin:5px;padding:5px">Row Stretch Factor</pre> | |||
|This sets the geometry of the widow relative to its parent including any window frame. | |||
|- | |||
|<pre style="color: green;margin:5px;padding:5px">Column Stretch Factor</pre> | |||
|This sets the geometry of the widow relative to its parent including any window frame. | |||
|- | |||
|<pre style="color: green;margin:5px;padding:5px">Outer Rect</pre> | |||
|This sets the geometry of the widow relative to its parent including any window frame. | |||
|- | |||
|<pre style="color: green;margin:5px;padding:5px">Margin</pre> | |||
|This sets the geometry of the widow relative to its parent including any window frame. | |||
|} | |||
[[File:Layout_element_addremoverefreshbutton.png|center]] | |||
Add layout button will add a layout next to the currently active layout. Remove Layout button will remove the active layout including all its child elements. Currently, Labrps only supports adding of elements as a linear horizontal vector (betterLayout management system under development). | |||
==Layout Management== | |||
adding or removing Layouts | |||
=Layer= | |||
The Layering system of LabRPS is the mechanism to control the rendering order of the elements inside the plot. When rendering, LabRPS goes through the list of layers bottom to top and successively draws the layerables of the layers into the paint buffer(s). | |||
[[File:Graph2d_layer.png|center]] | |||
Some of the layer orders are fixed for eg. canvas is the bottom most layer, followed by axis grid. Then you have all the layers associated with plottables and other items which can be custom organised followed by axis layer and Legend Layer. | |||
{{Docnav | {{Docnav |
Latest revision as of 20:02, 25 October 2024
Std New Graph |
Menu location |
---|
File → New Graph |
Phenomena |
All |
Default shortcut |
Ctrl+G |
Introduced in version |
0.1 |
See also |
Std New Matrix, Std New 2D Plot |
Description
The Std File New Graph command creates new graph.
Usage
- There are several ways to invoke the command:
- Press the New Graph button.
- Select the File → New Graph option from the menu.
- Use the keyboard shortcut: Ctrl+G.
Note
It creates a new (empty) graph. A 2D graph window displays the plot(s) and interacts with the user. The window has a canvas at its heart which is basically a background on which everything is drawn. one can add layout elements to the blank canvas which is the basic unit of a graph. A canvas can have an arbitrary number of child layout elements arranged in a grid fashion. The grid contains rows and columns to which layout elements can be added. Please see examples of 2D graph here and here.
Window
Graph2D windows typically shows layout order on top left side, layout management buttons on top right side and the plot in the center of the window
A Graph2D window item contains the following mutable properties:
Graph2D Properties | |
---|---|
Name |
Sets a name for the window which is unique consisting of alphabets and numbers. No two window can have same name or symbols in their name(s). |
Label |
Sets the descriptive text for the window contents. |
Geometry |
This sets the geometry of the widow relative to its parent including any window frame.
Note: for exporting the graph with a desired width and height, we recommend setting Plot Dimension property in Canvas section. |
Graph2D windows are linked to their tanble/matrix data source(s). Removal of data sources automatically reflect the contents.
Canvas
The canvas is the area in which everything is drawn.
Canvas Properties | |
---|---|
Plot Dimension |
The plot dimension is the area in which the plot is drawn. All mechanisms, e.g. margin calculation take the dimension to be the outer border of the plot. The dimention normally is the rect width and height of the canvas, i.e. a rect with top left (0, 0) and size of the canvas. |
Background Color |
Before drawing everything else, the background is filled with the selected color brush. For graphs with transparent background, set the color alpha level to 0; |
Divice Pixel Ratio |
Sets the device pixel ratio used by the paint buffers of this Graph2D instance.
Normally, this doesn't need to be set manually, because it is initialized with the regular PixelRatio which is configured by Qt to fit the display device (e.g. 1 for normal displays, 2 for High-DPI displays). |
OpenGL |
This method allows to enable OpenGL plot rendering, for increased plotting performance of graphically demanding plots (thick lines, translucent fills, etc.). If enabled is set to true, LabRPS will try to initialize OpenGL and, if successful, continue plotting with hardware acceleration. If the OpenGL initialization fails, rendering continues with the regular software rasterizer.
Warning: This is still an experimental feature and its performance depends on the system that it runs on. Having multiple LabRPS Graph2D items in one application with enabled OpenGL rendering might cause context conflicts on some systems. |
Row Spacing |
Sets the gap that is left blank between layout elements arranged in rows. |
Column Spacing |
Sets the gap that is left blank between layout elements arranged in columns. |
canvas represents the lowest layer of all LabRPS graphs.
Layout
An layout element is typically an area enclosed on all sides with an arbitrary number of axes, where the graphs/potables are drawn in. It defines the rectangular bounding of child elements like Axes, plot(s), Legend(s), item()s etc (equivalent to a layer in SciDavis, QtiPlot, or Origin). Layout elements don't draw anything themselves but act as a container holding child elements. By default, Layout elements come with two axes, at the bottom and left.
The number of buttons on the left top side represents the number of layout elements in the plot window (1,1 and 1,2). Each element is represented as a row,column fashion inside the buttons. The active layout is marked by the red highlight around the layout button and the red triangle at the top right corner of the active layout element. Active layout elements can be changed either by clicking the layout element or by clicking the layout element button or by clicking the respective layout element in the property browser windows object browser pane.
Layout Properties | |
---|---|
Background Color |
Sets a name for the window which is unique consisting of alphabets and numbers. No two window can have same name or symbols in their name(s). |
Fill Style |
Sets the descriptive text for the window contents. |
Row Stretch Factor |
This sets the geometry of the widow relative to its parent including any window frame. |
Column Stretch Factor |
This sets the geometry of the widow relative to its parent including any window frame. |
Outer Rect |
This sets the geometry of the widow relative to its parent including any window frame. |
Margin |
This sets the geometry of the widow relative to its parent including any window frame. |
Add layout button will add a layout next to the currently active layout. Remove Layout button will remove the active layout including all its child elements. Currently, Labrps only supports adding of elements as a linear horizontal vector (betterLayout management system under development).
Layout Management
adding or removing Layouts
Layer
The Layering system of LabRPS is the mechanism to control the rendering order of the elements inside the plot. When rendering, LabRPS goes through the list of layers bottom to top and successively draws the layerables of the layers into the paint buffer(s).
Some of the layer orders are fixed for eg. canvas is the bottom most layer, followed by axis grid. Then you have all the layers associated with plottables and other items which can be custom organised followed by axis layer and Legend Layer.
- File: New document, New Table, New Matrix, New Graph, New 2D Plot, New 3D Plot, Open..., Open Recent, Close, Close All, Save, Save As..., Save a Copy..., Save All, Revert, Import..., Export..., Merge project..., Document information..., Print..., Print preview..., Export PDF...Exit
- Edit: Undo, Redo, Cut, Copy, Paste, Duplicate selection, Refresh, Select All, Delete, Preferences...
- View: Fullscreen, Workbench, Sync view, Record selection, Single document, Multi document, Collapse/Expand, Initiate dragging, Go to selection, Selection back, Selection forward, Status bar
- Tools: Edit parameters..., Export dependency graph..., Project utility..., Alphaplot, Line, Scatter, Scatter, Scatter With X Err, Scatter With Y Err, Scatter With XY Err, Line + Symbol, Special Line + Symbol, Vertical Drop Lines, Spline, Vertical Steps, Horizontal Steps, Vertical Bars, Vertical Stacked Bars, Vertical Grouped Bars ,Horizontal Bars, Horizontal Stacked Bars, Horizontal Grouped Bars, Area, Channel Fil, Pie, Half Pie, Vectors XYXY, Vectors XYAM, Statistical Graph, Box Plot, Histogram, Stacked Histogram, 3D Plot, Bar, Scatter, Layout Grids, Vertical 2 Layouts, Horizontal 2 Layouts, 4(2x2) Layouts, 3D Wire Frame, 3D Surface, 3D Wire Frame Surface, Bar, Scatter, Contour + Color Fill, Countour Lines, Gray Scale Map, 3D Wire Frame Polar, 3D Surface Polar, 3D Wire Frame Surface Polar, 3D Scatter Polar, Polar spectrogram, Graph, Add/Remove Plot xy/xy..., Add Function..., Add Error Bars..., Add/Remove Other Plots..., Add/Remove Plot y..., Add/Remove Vector Plot..., Add Axis..., Add Left Axis, Add Bottom Axis, Add Right Axis, Add Top Axis, Legend Reorder, Add Text, Add Time Stamp, Add Image, Draw Line, Draw Arrow, Draw Ellipse, Add Nested Layout, Add Layout, Add Up, Add Down, Add Left, Add Right, Remove Layout, Swap Layouts..., Graph Tolls, Disable Tools, Data Rearder, Screen Reader, Select Data Range, Move Data Points, Remove Bad Data Points..., Drag Range, Zoom Range, Rescale To Show All, Table, Set Column(s) As, X, Y, Z, X Error, Y Error, None, Fill Selection With, Row Numbers, , Random Values, Custom Random, Show Comments, Show Controls, Formula Edit Mode, Edit Column Description, Change Type & Format, Clear Table, Sort Table, Assign Formula, Recalculate, Add Column, Go To Cell, Export ASCII..., Convert To Matrix, Matrix, Hide Controls, Set Coordinates, Set Display Format, Assign Formula, Recalculate, Clear Matrix, Transpose, Mirror Horizontally, Mirror Vertically, Import Image, Go To Cell, Invert, Determinant, Convert To Table, Add text document, Group, Units Calculator,Customize..., RPS Features..., Addon manager
- Macro: Macro recording, Macros, Recent macros, Execute macro, Attach to remote debugger, Debug macro, Stop debugging, Step over, Step into, Toggle breakpoint
- Help: Help, LabRPS Website, Donate, Users documentation, Python scripting documentation, Automatic Python modules documentation, LabRPS Forum, LabRPS FAQ, Report a bug, About LabRPS, What's This
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, AppImage
- Basics: About LabRPS, Interface, RPS Objects, Object name, Preferences, Workbenches, Document structure, Properties, Help LabRPS, Donate
- Hubs: User hub, Power users hub, Developer hub