Rescaling graphs and setting axis ranges

Using the graphical user interface to build and exercise models. Includes customizing the GUI by writing a little bit of hoc or Python
Post Reply
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Rescaling graphs and setting axis ranges

Post by ted »

If you need to rescale a graph, use the graph's "View = plot" feature.
1. Click on the graph's menu box (the square in the upper left corner of the graph).
2. Move the cursor slightly up and over to the right to reveal the graph's secondary menu.
3. "View = plot" is the first item in the secondary menu. Drag the cursor onto "View = plot", then release the mouse button. The graph's x and y axes will rescale to accommodate the range of plotted values.

"View = plot" tries to maximize the size of the plots at all costs, which often results in weird x and y axis ranges and tic mark locations. If you need to adjust the axes, use the graph's "Set View" feature.
1. Click on the graph's menu box.
2. Move the cursor into the graph's secondary menu to select "Set View", then release the mouse button.
3. A dialog box appears that asks for the "X size". Its text entry field shows the current minimum and maximum x values. If you like what you see, click on the Accept button. If you need to change the x axis range, click inside the text entry field and enter the min and max x values that you prefer, separated by a space. For example, if the x axis runs from 1 to 9 and you want it to run from 0 to 10, enter

Code: Select all

0 10
Then click on the Accept button.
4. The "X size" dialog box vanishes, and a "Y size" dialog box takes its place. Specify the y axis range the same way you dealt with the x axis. For example, if the y axis runs from 0.005 to 0.035 and you want it to run from 0 to 0.04, enter

Code: Select all

0 0.04
Then click on the Accept button.

After you "Accept" the y axis range, the graph's x and y axes will change to reflect the values you specified.
Post Reply