Skip to content

Commit f054902

Browse files
authored
Merge pull request #2543 from ControlSystemStudio/db_doc
Data browser doc
2 parents e7a6ec4 + a0bbd64 commit f054902

File tree

1 file changed

+47
-6
lines changed

1 file changed

+47
-6
lines changed

app/databrowser/doc/index.rst

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,35 @@ To create a new plot:
3535
.. |databrowser| image:: images/icon_databrowser.png
3636
.. |add| image:: images/icon_add.png
3737

38-
A plot may be saved to disk by selecting ``Save Snapshot`` context menu item, or by using keyboard shortcut
39-
CTRL + S (CMD + S on Mac OS). The default file extension for plot files is .plt.
38+
Plot Configuration ``.plt`` Files
39+
---------------------------------
40+
41+
Use the ``File``, ``Save`` menu entry or the keyboard shortcut
42+
CTRL + S (CMD + S on Mac OS) to save the plot settings, which include
43+
PV names, trace colors and axis arrangements.
44+
The default file extension for plot files is ``.plt``.
45+
You can later re-open the configuration by opening the ``.plt`` file,
46+
adjust settings, for example axis ranges, and save the updated configuration.
47+
48+
The ``.plt`` files store the configuration of a plot, but no data.
49+
To save an image of the current plot, use ``Save Snapshot`` from the plot context menu item.
50+
To save the data shown in the plot, refer to the "Exporting Data" section below.
51+
52+
Note that any zooming or panning of a plot changes the plot settings,
53+
so when then closing the plot, you will be prompted to save the updated settings.
54+
This may not be desirable in an operational setup. For example, assume a ``.plt`` file was
55+
created with a time axis range that displays the last 6 hours. When users
56+
open this configuration, they are free to zoom in or out, even add or remove traces,
57+
but when they close the plot, you may not want them to overwrite the original settings.
58+
59+
There are two ways to accomplish this.
60+
One is the "Save Changes" option in the plot's "Properties Panel" described below.
61+
The other is making the ``.plt`` file read-only using operating system file tools
62+
or the CS-Studio File Browser. Configuration files can also be loaded via HTTP links,
63+
which are always read-only. When trying to close a plot with modified configuration,
64+
the Data Browser noticed if the original file cannot be written and will prompt
65+
with a "Save-As" dialog to offer saving to a new file.
4066

41-
Note however that the Data Browser may be launched using an existing plot file which may be read-only (e.g. a
42-
remote file accessed over HTTP). In such cases a save operation will offer the user the option to save to a new file.
4367

4468
Toolbar
4569
-------
@@ -102,8 +126,8 @@ to zoom in or out of an axis or the plot.
102126

103127

104128

105-
Property Panel
106-
--------------
129+
Properties Panel
130+
----------------
107131

108132
Open the plot's property panel by right-clicking into the plot,
109133
then invoke |properties| ``Open Properties Panel``.
@@ -113,6 +137,23 @@ then invoke |properties| ``Open Properties Panel``.
113137
The panel allows you to configure each trace, the time axis, the value axes,
114138
and miscellaneous settings. Changes performed in this panel will be persisted when the plot (.plt) file is saved.
115139

140+
The meaning of most options should become evident by simply using them, with a few exceptions.
141+
142+
On the "Misc." tab, "Plot redraw period" and "Scroll Step" control how the plot updates and scrolls.
143+
For example, a redraw period of 1 and a scroll step of 10 refreshes the plot every second, while scrolling the
144+
time axis every 10 seconds. This makes for a plot that mostly stands still, only moving every 10 seconds.
145+
Larger redraw periods can be useful to reduce CPU usage.
146+
147+
The "Save Changes" option on the "Misc." tab controls how the plot behaves when closed.
148+
By default, the option is checked, and trying to close a modified plot will open a "Save before closing?" prompt.
149+
In an operational scenario, certain plots may be provided with default settings that are not meant
150+
to be overwritten. For those, un-check the "Save Changes" option. Users can now open the plot,
151+
zoom, pan, even add or remove traces, and then simply close the plot without a prompt, preserving
152+
the desired default settings. Note that when you un-check the "Save Changes" option to get this
153+
behavior, you already activated it, so you need to use "Save As" from the File menu to save
154+
the ``*.plt`` file with the un-checked "Save Changes" option.
155+
156+
116157
Runtime Properties Dialog
117158
-------------------------
118159

0 commit comments

Comments
 (0)