What is the number coding scheme for colors/symbols/line types?

Minitab Help contains topics documenting the various codes. You can find these topics with a simple search.

  1. Choose Help > Help, then click Session Commands below References.
  2. In the Minitab Session Commands Help window, select the Search tab.
  3. Type "standard colors," "symbol type," or "line types," depending on the codes you want to find.
  4. Check Search titles only.
  5. Click List Topics to see the Standard Colors, Symbol Type, or Line type topic which contains a table of the number coding scheme.

Using commands, how can I save a Minitab graph as a JPEG, PNG, TIF, or Windows BMP file?

Create the graph using the session command, the GSAVE subcommand, and the applicable graphics format subcommand. For example, suppose you want to create a histogram of column C1 and save the graph as a JPEG in the root of your C: drive with the filename Defects. Use the following commands:

HIST C1;
GSAVE "C:\Defects";
JPEG.
Note

For TIFF (Tagged Image File Format), use the subcommand TIFC. For PNG (Portable Network Graphics), use PNGC. For Windows BMP (Windows Bitmap), use BMPC.

Note

In a macro, you may see GSAVE used in other commands, such as CALL. The graphics format subcommand mentioned here, such as JPEG, should not be inserted in such cases.

How do I print a graph from the macro I wrote?

Use the GPRINT command.

Example 1

This example creates a histogram and boxplot, and prints the boxplot.

HIST C1;
BOXPLOT C1;
GPRINT.

Example 2

This example creates a histogram and boxplot, saves the graphs as HIST.MGF and BOX.MGF respectively, and prints the boxplot.

HIST C1;
GSAVE "HIST.MGF".
BOXPLOT C1;
GSAVE "BOX.MGF".
GPRINT

Example 3

This example creates a histogram and boxplot, saves the graphs as HIST.MGF and BOX.MGF respectively, and prints the histogram.

HIST C1;
GSAVE "HIST.MGF".
BOXPLOT C1;
GSAVE "BOX.MGF".
GPRINT "HIST.MGF"
Note

With no argument, as in Example 1 and 2, GPRINT prints the active Graph window. With an argument, GPRINT will open the specified graph and send it to the computer's default printer.

How can I use today's date (or today's date and time) as a footnote on the graph I'm creating with a local macro?

For example, suppose you want to put the current date as a footnote on a histogram of a column called YIELD.

Note

The steps below assume that columns called YIELD and TMPDATE, and a constant called DATE are listed in the declaration section of the local macro, and that the column YIELD contains data.

  1. Use the TODAY() function to store the current date in a column:
    LET TMPDATE = TODAY()
    Note

    If you want the current date and time on the graph, use NOW() instead of TODAY().

  2. Change the data type so the column is formatted as a text column:
    TEXT TMPDATE TMPDATE
  3. Store the date as a constant:
    LET DATE = TMPDATE
  4. Use the constant in the FOOTNOTE subcommand:
    HIST YIELD;
    FOOTNOTE DATE.

How can I write my macro so that I control pausing after graphs are created?

To control pausing, include one of the following forms of the GPAUSE command in your macro:

GPAUSE

This command tells Minitab to pause for K seconds (K can be any integer between 0 to 1800) after displaying each graph until you press any key or the mouse button.

GPAUSE K

Is there a Session command to close the last graph or all graphs?

An undocumented Session command, GMANAGER, can be used to close graphs.

Note

This command is experimental and has not been as rigorously tested as commands documented in Help. Although the command is usable, you should apply it with caution--we do not take responsibility for any unexpected results. The form and syntax of this command are subject to change.

To close the last graph, use the following command:

GMANAGER;
CLOSE.

To close all graphs, use the following command:

GMANAGER;
ALL;
CLOSE;
NOPROMPT.

If you do not want to be prompted to save the graph before closing do the following:

  1. Choose Tools > Options > Graphics > Graph Management.
  2. Choose Never next to Prompt to Save a Graph Before Closing. Click OK.

Note that changes you make in Tools > Options will apply when closing all future graphs.

How to use subcommands such as GSAVE and WTITLE for graphs that do not include these subcommands

You can use subcommands such as GSAVE and WTITLE for graphs that do not include these subcommands if you also use the LAYOUT command.

Using GSAVE and WTITLE for GSUMMARY

Stat > Basic Statistics > Graphical Summary

Suppose you want to save the Graphical Summary of C1 as a JPEG with the name YIELD.JPG in C:\My Statistics, and you want "San Francisco" to be displayed in the title bar of the graph. Use the following commands:
LAYOUT;
GSAVE "C:\My Statistics\YIELD.JPG";
JPEG;
WTITLE "San Francisco".
GSUMMARY C1
ENDLAYOUT.

Using GSAVE and WTITLE for GageRR

Stat > Quality Tools > Gage Study > Gage R&R Study (Crossed)

Suppose you want to run the following Gage R&R Study (Crossed) command:
GageRR;
Parts 'Part';
Opers 'Operator';
Response 'Measurement';
Studyvar 6.
Suppose you want to save the graph as a JPEG with the name GageRR.JPG in Q:\Project, and you want "Gage 1" to be displayed in the title bar of the graph. Use the following commands:
LAYOUT;
GSAVE "Q:\Project\GageRR.JPG";
JPEG;
WTITLE "Gage 1".

GageRR;
Parts 'Part';
Opers 'Operator';
Response 'Measurement';
Studyvar 6.

ENDLAYOUT.
By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy