Please enable JavaScript to view this site.

This guide is for an old version of Prism. Browse the latest version or update Prism

Navigation: Scripts > Script syntax

Changing graphs

Scroll Prev Top Next More

Commands

ApplyColorScheme ["scheme name"]

SetAxisTitle [which axis: X, Y, or Y2] ["new title"]

SetGraphTitle [“new title”]

SetAxisLimits [which axis: X, Y, or Y2] <segment #> [Top/Bottom/Interval]  [value]

Explanation

You must create graphs manually (or by duplicating). You can’t change most graph properties via scripts, but you can apply a color scheme, change the limits of an axis, and change the graph or axis titles.

When entering the graph or axis title, you can only enter plain text, and Prism does not provide tools to enter Greek letters, math symbols, superscripts or subscripts. But note that Windows lets you enter some special characters by holding Alt and typing its four digit code. For example, alt-0181 enters the Greek letter mu.

To use the % symbol in an axis or graph title, enter it twice. The command "SetAxisTitle Y %% Complete" changes the Y axis title to "% Complete". This is because the % symbol is used to indicate a variable.

Each use of the SetAxisLimits command lets you change the range (minimum and maximum  values) or interval of an axis. Each use of the command only lets you change one of those values. If you want to change the Y axis (left Y) so it ranges from 100 to 200 with an interval of 10, you need to use this command three times (in any order):

SetAxisLimits Y top 200

SetAxisLimits Y bottom 100

SetAxisLimits Y interval 10

If the Y axis was split into two segments, you need to specify which segment to change. The first (left or bottom) segment is '0', and the second segment is '1'. If you wanted to change the bottom  segment, use these commands. Note that it is not enough to specify the segment number; you also need to include the word 'segment'.

SetAxisLimits Y segment 0 top 200

SetAxisLimits Y segment 0 bottom 100

SetAxisLimits Y segment 0 interval 10

After you change a graph using a script, linked layouts won't update unless you write script commands to go to that layout. Here is a script that flips through all the layouts, so ensures they are all up to date.

Goto L

ForEachSheet

Next

 

 

 

 

© 1995-2019 GraphPad Software, LLC. All rights reserved.