Graphic 3 for SigmaPlot

Keywords: Math Graphing Software, math, graphing, software, math

Making the Graph Page the Currently Displayed Window

We will use two SigmaPlot automation statements to determine the name of the page and then "open" it; i.e., bring it to the front. At the bottom of the macro add the following statements:

Next I
'bring graph to front
Dim GraphPageName As String
GraphPageName=ActiveDocument.CurrentPageItem.Name
ActiveDocument.NotebookItems(GraphPageName).Open
End Sub

The first statement GraphPageName=ActiveDocument.CurrentPageItem.Name gets the name of the CurrentPageItem in the ActiveDocument. A graph page is "current" if it is open and "topmost" (closest to you). In our case there is only one graph page so it needs to be open to be current - which it is. So this statement retrieves "Graph Page 1" as the graph name. Use Help to understand the automation statements. To do this highlight "CurrentPageItem."

Math Graphing Software gr1

and press F1. This gives the help item on CurrentPageItem that explains

Math Graphing Software gr2

Note the last comment about an error that can occur. See "Look at the macro code" for additional errors that can occur when macros are recorded. Help mentions that the ActiveDocument property must still be used. Highlight "ActiveDocument" and press F1. Help explains

Math Graphing Software gr3

In our case there is only one notebook (Exponential Data Set.jnb) and it is open so it is the active notebook. If you click on Objects in the above help screen you will find that a notebook is part of the SigmaPlot application and this begins to describe the object hierarchy with application at the top, notebooks next, objects in notebooks (graph page in our case) next, and so on.

The second statement ActiveDocument.NotebookItems(GraphPageName).Open brings the graph page to the front. It does this as a side effect of opening the page. Since, in our case, the page is already open (if it was closed you would see its icon in the notebook but not see it displayed as a window) all it does is bring its window to the front. Highlight "Open" and press F1. You find that the Open statement can be used to open notebooks (.jnb files) as well as notebook items (graph pages, worksheets, fit equations, etc.)

Save the modified macro and close its window. Run the macro by selecting Exponential Fit from the Macros menu. When it is finished, the graph window is displayed and is no longer hidden behind the worksheet.

If you are really persnickety about the looks of the displayed graph you will note that one set of symbols is highlighted and therefore looks funny. It is a simple procedure to un-highlight the symbols by hand by clicking outside the graph. We can emulate this in our macro as a quick-and-dirty procedure to un -highlight the symbols. We simply add a statement that corresponds to a mouse click outside the graph page. The easy way to find out what that statement is is to copy the appropriate statement from a recorded macro and add this statement to our macro. When this is done, the graph looks perfect.

Back to SigmaPlot Product Uses Page.

 

SigmaPlot gr 1

 

 

 

Buy Sigma Plot!

Sigma Plot
Product Details

21 CFR 11
Sigma Plot Capabilities
Sigma Plot Requirements
Use Within SPSS
New in Sigma Plot 8.0
New in SigmaPlot 9.0
New in SigmaPlot 10.0

Sigma Plot
Resources

Sigma Plot Add-on Modules
Sigma Plot FAQ
Graph Showcase
Sigma Plot Quotes
Sigma Plot Product Uses
Technical Support

SPSS Base
Add-on Modules

SPSS Advanced Models
SPSS Categories
SPSS Complex Samples
SPSS Conjoint
SPSS Exact Tests
SPSS Maps
SPSS Missing Value
   Analysis
SPSS Regression
   Models
SPSS Tables
SPSS Trends

SPSS Other Products
SPSS Amos
SPSS AnswerTree
SPSS Data Entry Builder
SPSS Data Entry Station
SPSS Data Entry System
SPSS DecisionTime
SPSS SamplePower
SPSS SmartViewer
SPSS TextSmart

SPSS Training
SPSS Web-based Training

Other Products
AutoSignal
PeakFit
SigmaPlot
SigmaScan
SigmaStat
SYSTAT
TableCurve 2D
TableCurve 3D

 

 

 

bottombar221

Gold Jewelry