Menu box

 

 

By default, the menu box contains 8 items. Some or all of these items may be missing if they were specifically excluded by using the 'Options' argument in the calling sequence. See pltquiv.m for an example of how you can add a new menu box function. Clicking on the menu box items has the following effect:
 

Help

Normally when you click on the the 'Help' tag plt will display the file plt.chm on Windows systems and the file plt.htm otherwise. This behavior may be modified if the 'HelpFile' parameter is included on the command line. That parameter is described here.

LinX

The x-axis scale changes from linear to logarithmic. This tag also changes to LogX so that it always matches the current scaling of the x-axis. Clicking again toggles it back to LinX.

LinY

The x-axis scale changes from linear to logarithmic. This tag also changes to LogX so that it always matches the current scaling of the x-axis. Clicking again toggles it back to LinX.

Grid

Alternates between no grids (tick marks only) and full grids for both axes. By default, a dim grey is used for the grid lines (see the GRIDc parameter). A higher contrast color (such as used with plot) makes it more difficult to observe the main data traces.

Zout

Each left click of the Zout (Zoom out) tag expands the x and y axes by 40% (20% at each end). This approximately doubles the area of the cartesian plane displayed within the axis limits. (1.42 = 1.96). Right clicking on the Zout reverses the effect of a left click (i.e. zooms in).

XY

Each click on the XY (XYrotate) tag cycles the x and y axis limits to the next display expansion stored in a history list. (The axis limits from the last four zooms or pans are saved in this list). After all the display limits in the history list are used, the next click autoscales both axes so that all the data is displayed. The next click again uses the first display expansion in the history list.

Print

Note that the Print tag does not appear in the menu box by default. It will only appear if enabled by an 'Options' argument in the calling sequence.

Assuming you did enable it, when you click on this Print tag this "HardCopy" dialog box will appear. The primary use of this dialog box is to create BMP images of the plt window. (You will see from the popup menu, that you can select other graphics formats although these are not well tested). For all file types except BMP, the colors are inverted if the background is dark. On most printers this makes the copy far more readable and saves large amounts of toner.

The reason that this tag is off by default is that it can also be reached from the "HardCopy" submenu of the File menu in the menu bar, and that is the preferred way to access it. If you don't see the menu bar, click on the Menu tag in the menu box to make the menu bar visible.

You can also print directly to the windows device from the HardCopy menu, however an easier (and probably more reliable) way of doing this is to select "print" from the File menu). And finally, often the windows screen capture facility (via the PrintScreen key) is often the most appropriate method. To enhance the screen capture method, before pressing PrintScreen you can right click on the y-axis label. This hides the menu box and cursor objects so these objects won't distract from the basic plot data. Right clicking on the y-axis label a second time re-enables the cursor objects.

Mark

When you left click on the Mark tag, a circular mark is placed at the current cursor location and a text string is added to the plot containing the x and y coordinates of the cursor location. The text string will be the same color as the active trace. If the text label is not positioned where you want it, click on the label and drag it to the desired location.
 

If you right click on the text label, a new dialog box will appear which allows you to change any or all of the properties of both the trace marker and the text string. The two pictures below show the Marker and String properties respectively that you can edit. Note that both the Marker and the String popups have delete as one of the options. This is useful if you want to put a marker without a string or a string without a marker. You may delete all the markers you have added this way by selecting delete and then typing all into the edit box below the popup. The same trick works for deleting all the strings added to the figure via the Mark tag. Note that you can have many of these Edit Marker dialog boxes open at same time - as many as one per text string (or even more, although there is probably little benefit to that). All these dialog boxes will be deleted automatically if the main plot window is deleted.

Once you select one of the 8 marker properties, or one of the 10 string properties, the current value of the property appears in the respective edit box. To change the property value, click in the edit box, and type in a new value.

Note that when you select the color property, the property value is a set of three numbers corresponding to red, green, and blue respectively. Each number is an intensity value and must range from zero (off) to 1.0 (full intensity). You may change the color by entering the desired rgb values. When you press <Enter> the new value will be accepted and you will see the marker or string change to the new color. However since it is often difficult to predict exactly what these colors look like, plt provides an easier way to select new colors. Instead of left clicking on the rgb triple, use a right click. A new color section box will appear. The use of the color selection box appears below, since the same dialog box is used to adjust figure and line colors.
 

Menu

The menu bar is not visible by default (unless 'options','m' appears in the argument list) but may be enabled by left clicking on the Menu tag. (The menu bar is described below.) Right clicking on the Menu tag will toggle the line styles used for all the lines for all the traces of all the plots in the figure (including subplots). The first right click will change the style from lines to markers; the 2nd right click will change the style to showing both lines and markers, and the 3rd will restore the style back to the original lines only.

 

Menu Bar

If plt is compiled into an .exe application, only the first and last menus (File and Color) will appear. (The other menu items depend on the MatLab application, so it must be installed and running.)

The most useful function of the menu bar for most plt applications is Print, the last item under the File menu. This is probably the easiest and most reliable way to make a hardcopy of the plt window. As you can see is this picture, plt adds the following three items to the File menu:

 

 

The last menu item (Color) is unique to plt. When you click on this menu item you will see these four submenus.

To change the color or other property of a trace or of its associated cursor, first click on the trace that you want to modify (i.e. make the trace active) and then click on the Edit line submenu. You will see a new figure similar to the one below:
 

Editing line, cursor, and figure properties

As you can see from the submenu, you can also bring up the edit line figure by pressing the <Control E> hot key. (Right clicking on the Mark tag in the menu box is yet a third way to bring up the edit line dialog box. That might be quicker if the menu bar is hidden.)

 

The left side of the Edit Line dialog box controls the properties of the active trace and the right side controls the properties of the cursor attached to that trace. The properties that appear in both these popups are the same as those under "Marker properties" in the Edit Marker dialog box shown above. Note that one can edit the data plotted by selecting and editing the Xdata or Ydata line properties. This works well for simple traces with less than a few dozen data elements. For longer sequences you will be better off using  the data editing technique described in the data editing section. Note that (for example) if you modify the Ydata property by removing or adding data elements that the line will dissappear until you also modify the Xdata property by removing or adding the same number of points. This is because the line object can't be rendered unless the lengths of the Xdata and Ydata properties are the same.

If you want to edit the properties of the line associated with a right hand axis (if one has been enabled) you must:

If you want to edit all the lines at once, click on the Edit all lines submenu. A dialog box such as this will appear. (An alternate way to bring up ths dialog box is to open a zoom expansion box and then right click on the Mark tag.) When you change the popup menu to select a new property, the edit box will be updated to show the current value of that property for the active trace just as before. However if you then change the property value in the edit box, this property will get changed for all the traces on the plot, not just the active trace. This is probably not appropriate for the color property, but it may be useful for some of the other trace properties, such as linewidth. You can also use this dialog box to make all the cursors larger or a different shape for instance.
 

The next submenu is Edit figure colors which brings up this dialog box. From this dialog box you can change all of the figure colors which are not accessible from the edit lines dialog boxes described above.
 

These are the six items that you can modify from the Edit figure colors dialog box. After selecting one of these items, the current color of that item appears in the edit box below the popup as a set of three intensity numbers corresponding to red, green, and blue respectively. You may change the color by left clicking the edit box and entering the desired rgb values or by right clicking the edit box which will bring up the color selection box shown below:
 

The Color Selection box

When using the "Edit Marker", "Edit line", "Edit all lines", or "Edit figure colors" dialog boxes described above, if you right click on an edit box containing an rgb triple, the color selection box will appear.

As with the rgb triples, the three sliders represent the intensity values (except in percent) and will initially be set to the same values that were in the edit box. You can move the sliders (or type in new values) to give the proportion of each color that you want. Only integer values between 0 and 100 are accepted giving you more than a million different colors (101 cubed). As you move the sliders, the color of the marker, line, or figure element selected is continually adjusted to reflect the slider settings. The color of the large rectangular patch to the right of the red slider (called the "current color patch")  is also adjusted at the same time which makes it easier especially for the smaller screen elements.

To make it easier to find the most pleasing color, the 11 by 11 grid of colors is also updated every time a slider is moved. What this grid shows you are the colors that result when the intensity value of the active slider is mixed with 1 of 11 different intensity values of the two inactive sliders. The active slider (i.e. the slider that was last moved) is shown highlighted in yellow.

So for example, in the figure above, the bottom slider (blue) is active and happens to be set to 0%. This means that all 121 squares of the grid are made up of colors containing no blue. Each row of the grid contains a different intensity percentage of red (0% for the bottom row, 10% for the next row, and 100% for the top row). Likewise each column of the grid contains a different intensity percentage of green (0% for the left column and 100% for the right column). Thus, the upper right square in this example then would be yellow (rgb = [1 1 0]).

When you see a color in the grid that you like, just click on it. The screen element selected as well as the current color patch will instantly change to be the same as the color you clicked on. Of course the two inactive sliders move to show the intensity values of the color you just selected. If you can't find a better color, you can revert to the color in effect when you right clicked on the rgb triple by clicking on the current color patch.

All this may sound somewhat complicated, however it is far easier to do than to explain. Generally you can pick any of the three sliders, move it around a bit, and you will quickly see the color you want in the grid. By the way, clicking on the slider trough area moves the slider by 10%, so if you want to limit yourself to the 1,331 colors formed with the intensities 0,10,20,30,...100%, then you can see all such colors after just 10 clicks of the mouse.

Save figure colors

Changing colors inside the plt figure using the color selection box is not permanent (i.e. those colors will be forgotten once the application is closed). However you can make the changes permanent by selecting the last choice in the color menu (Save figure colors). Selecting that submenu will save the current colors to the color file. You will find the rules that plt uses to determine the color file name in the description of the 'ColorFile' parameter here.

When plt starts, the color for each screen element is determined as follows:

These color files are in a consistent format so a color file generated in one application can be used in another application by renaming the color file, or by using the name of the desired color file explicitly with the 'ColorFile' parameter. It's possible to edit the color files in the MatLab command window (load, edit save), however it is usually easier to edit them in the same application that created them.