Sharing Graphs - JMP Essentials: An Illustrated Guide for New Users, Second Edition (2014)

JMP Essentials: An Illustrated Guide for New Users, Second Edition (2014)

Chapter 7. Sharing Graphs

This chapter focuses on common ways you can customize and share JMP graphs with others whether you are presenting those findings yourself, placing them in a document, or sending a file. We also provide some advice for effectively doing so.

One of the most important things a JMP user can do is communicate results (data, statistics, and graphs) clearly and accurately. Most people recognize that it can be easy to manipulate results or create a graph that doesn’t tell the whole story. The first section of this chapter is devoted to some principles of effective communication with graphs.

If you want to annotate a graph with comments or change colors or other settings before moving it into another document, JMP provides several convenient tools introduced in Section 7.2.

We’ll work with three types of graphical output in this chapter:

1. Fixed or static graphs (sections 7.3, 7.8).

2. Dynamic or interactive graphs, which allow you to manually click on points to highlight (sections 7.4 and 7.7).

3. Animated graphs, which perform like movies. Simply press go and watch (sections 7.5, 7.6).

Moving static graphs into other applications, such as Microsoft Word and PowerPoint, is a straightforward operation in JMP. We illustrate some options in Section 7.3 that allow you to edit the results in other applications.

Moving dynamic and animated graphs onto the web or into other applications while retaining many of the interactive capabilities can be a little more involved, which we walk through in Sections 7.4 through 7.7.

Further, you might want to combine different graphs into an interactive dashboard by combining windows or using the JMP Layout tool to annotate and combine several graphs into a single static report. We cover the essentials of these features in Sections 7.7 and 7.8.

7.1 Presenting Graphs Effectively

Presenting statistical graphics in a report or presentation is a common task for many JMP users. As such, it is critical that you do this well. By well, we mean that you rely upon the data to tell the story, be succinct, and, most importantly, present an accurate and valid interpretation (visual, numeric, verbal). It helps to keep the following in mind when presenting statistical graphics:

• Understand your data and its limitations. Time spent with your data before you present it prepares you for the questions that may emerge.

• Focus on the important factors. What columns are core to the problem or question at hand?

Note: How do you determine which variables or columns are most important? The methods described in Chapter 6 can help you identify important columns of interest. For example, the Partition platform (Section 6.1) can help you find out which columns are the key factors affecting another variable.

• Provide the simplest expression of the data to convey the most complete description of it.

• Present graphs accurately. Do not reduce ranges in graphs to magnify changes or increase ranges to hide trends.

• Let graphs speak for themselves and avoid using unnecessary background colors or dimensions that distract from the core information you are conveying. Make sure the graph can be seen by your audience.

An important feature of JMP is that it helps you adhere to these principles and commonly accepted standards. JMP can provide many different types of appropriate graphs of your data, so how do you know which is the most effective way to communicate your information? You will find that using common sense goes hand-in-hand with effective presentation of data and graphical integrity.

In recent years, there have been a number of new books on the subject of presenting quantitative graphs and visualizing data effectively. Perhaps the best-known of these are books by Edward Tufte, whose beautifully crafted works have won wide acclaim and illustrate the core principles of presenting quantitative information effectively. These books and those by Stephen Few (see the Bibliography) are highly recommended if you use graphs extensively.

7.2 Customizing Graphs for Presentation

There are many features in JMP that provide you with the ability to customize graphs for presentation. Sometimes you’d like to annotate a graph by pointing out a key attribute of the graph. Or, you might want to use color or markers to enhance other columns and attributes, as described in Section 2.6.

This section introduces the common tools needed to prepare your graphs and results before moving them into another application or document.

Most of JMP’s formatting options appear by simply right-clicking on the area (for example, the graph or axis) you’d like to customize. When customizing your graphs, be sure to make changes within JMP before pasting them into another application. The first step, however, is to look at a powerful set of tools called the JMP Toolbar that we begin with in this section.

Example 7.1 SAT by Year

We will be using the SATByYear.jmp data table to illustrate the concepts in this chapter. SAT by Year is data representing SAT (Scholastic Aptitude Test) and ACT (Achievement Test) test performance by college-bound students in the United States covering the years 1992 to 2004. The tests serve as an important admission metric for colleges and universities.

The data consists of 17 columns and 408 rows of data and includes the following columns:

State Students’ state of residence

Expenditures (1997) State expenditures per pupil

Student/Faculty ratio (1997) Ratio of students to faculty

Salary (1997) Mean salary of teachers (in thousands)

%Taking (2004) Percent taking the SAT exam in 2004

Population Population of the state

% Taking (1997) Percent of students taking the SAT in 1997

ACT Score (2004) Mean test scores by state in 2004

ACT % Taking (2004) Percent taking ACT in 2004

ACT Score (1997) Mean test scores by state in 1997

ACT %Taking (1997) Percent taking ACT in 1997

Year Year of the tests

SAT Verbal Mean SAT Verbal test score by state

SAT Math Mean SAT Math test score by state

Region Region in which state resides

You can access this data at HelpSample DataOpen the Sample Data Directory ▶ SATByYear.jmp.

Using the JMP Toolbar

When JMP graphs are generated, the Toolbar contains several tools that help you copy, annotate, and share them (Figure 7.1).

Figure 7.1 JMP Toolbar

image

Once a tool is selected, your mouse is transformed into its corresponding function. If these do not appear on your home window, select ViewToolbarsTools. These tools are useful in the JMP Layout platform (see Section 7.8), where you might construct a report. Many of these tools have familiar functions:

The Selection tool image allows you to select graphs or reports (or portions of them) to be copied and pasted into Word, PowerPoint, or other applications.

Within the Toolbar, the following functions allow you to add comments or highlight areas of your graphs:

Annotate image allows you to add a textbox or comment in your graphs.

Lines image allow you to draw lines on your graphs. For example, an arrow drawn from a textbox to a point on a graph.

Polygon and Simple Shape image allow you to draw shapes in your graphs.

Note: The Toolbar features are also available from the Tools menu that appears at the top of the JMP window.

Figure 7.2 is an example of what these tools can do for you. You can summarize key aspects of your data with the Annotate tool and create pointers using the Lines tool to call out this information. Interpretation of this kind can provide valuable direction when you are not there to guide the report recipient. To generate these graphs in the SATByYear data table, select Analyze ▶ Distribution ▶ Student/Faculty Ratio and ACT Score, Y, Columns ▶OK.

Figure 7.2 JMP Results Window with Annotations

image

To create these features in JMP, do the following:

1. Select the Annotate tool image from the JMP Toolbar.

Click on your report where you want to add an annotation. Type your comment and then left-click outside the annotation box. You can then move or resize the box as you would any textbox or change the color of the background by right-clicking on the box.

2. To add lines or pointers, select the Lines icon image from the Toolbar and draw the line. Once the line has been drawn, right-click to access the options for pointers, thickness, style, and color.

Note: When you’d like to annotate more than one graph window and show these together, use the Layout tool (discussed in Section 7.6).

Using Color

Changing the colors of your basic graphs is simple. Just right- click within the graph area (see Figure 7.3). In the Distribution platform, select Histogram Color and select a color. The method of accessing color options varies slightly by platform but generally can be found by right-clicking on the graph or through the red triangle. If you want your graphs to always use the same color, you can change the JMP defaults by selecting Save Color Preference. For more information on setting preferences, see Chapter 1.

Figure 7.3 Changing Histogram Color

image

Coloring a graph in this manner does not affect graphs where individual rows are color-coded by a column value within the data table. (See Section 2.6 for more information on how to use color to denote a category or range within a graph.)

Background Color

You can change the background color of any graph by right- clicking in a graph area and selecting Background Color (see Figure 7.4). When using background colors, be mindful not to distort, distract, or obscure the information in the data.

Figure 7.4 Changing Background Color

image

Horizontal Layout

Within the Distribution platform, the default display places the histograms in a vertical (side-by-side) format. Clicking on any bin (or bar) within one histogram highlights those values in the remaining histograms. This is especially useful when you are exploring relationships among two or more columns and don’t want to scroll down.

Sometimes, however, you’d like to see the histogram in the more traditional horizontal format. Rotate the display by simply selecting Display Options under the red triangle after you’ve created a histogram and then selecting Horizontal Layout (see Figures 7.5 and 7.6).

Figure 7.5 Specifying Horizontal Layout

image

Figure 7.6 Horizontal Layout Result

image

Note: If you want to stack multiple histograms horizontally, one on top of the other, you can use the Stack command under the Distributions red triangle (immediately above Salary’s red triangle illustrated in this example).

Axis

JMP allows you to easily change the axis of any graph by simply grabbing the axis and moving it. Alternatively, you can right-click on the axis to access the following menu (see Figure 7.7).

Figure 7.7 Axis Settings

image

By selecting Axis settings, you access the Y Axis Specification window (see Figure 7.8). In it, you can customize the range, increment, and other axis options.

Figure 7.8 Axis Settings Dialog Window

image

7.3 Placing Graphs into PowerPoint or Word

Copying a fixed or static JMP graph into Word or PowerPoint is simple. You just need to use the Selection tool to select what you want and then copy and paste the graph into your document.

Note: If you are using JMP 12, this process is made even easier by simply selecting FileSave, select Save as typePowerPoint Presentation (or Microsoft Word 2000+) from the desired results window.

Let’s illustrate this with the following example. Say you want to move the graph in Figure 7.9 from JMP into PowerPoint.

Figure 7.9 Moving a Graph

image

1. Select the Selection tool (see Figure 7.10).

Figure 7.10 Use the Selection Tool

image

2. Click on the upper left corner of the graph, as shown, to capture the entire picture (see Figure 7.11).

Figure 7.11 Selecting Graph Components

image

Alternatively, you might want to copy only selected elements of the graph, in which case you click and drag the cursor to select the elements you’d like to copy.

3. Right-click and select Copy (see Figure 7.12).

Figure 7.12 Copy the Graph

image

4. Open the desired application (PowerPoint in this case), open the presentation and create a slide with the desired layout, right-click, and select Paste (see Figure 7.13).

Figure 7.13 Pasting the Graph in PowerPoint

image

Note: When using JMP’s default paste function, the object can be re-sized in the new application, but the contents are fixed.

Special Paste Functions

JMP also provides additional paste formats and functions. Sometimes you might want to edit the results or graph, or you need to provide the graph in a specific format. JMP has some options for you:

• Use Paste Special. This allows you to paste a .bmp or metafile (see Figures 7.14 and 7.15). Metafile is a vector art graphics format that can be edited in detail by Word and PowerPoint on Windows.

Figure 7.14 Paste Special

image

Figure 7.15 Paste Special Options

image

• If you want to change the formatting options of the graphs you want to paste, change your preferences to reflect this:

1. Select File ▶ Preferences.

2. Select Windows Specific (or MAC OS).

3. Under Copy/Drag Graphic formats, check the formats you want as options or remove options by unchecking them. (see Figure 7.16).

Figure 7.16 Changing Formatting Options

image

Note: if you simply wish to save your results in a certain file type, such as a JPEG, EPS, PDF or HTML, you can simply select Save As ▶ type from the File menu. As an example, we will describe how to save an interactive HTML file in the next section.

7.4 Sharing Dynamic Graphs with HTML 5

Because JMP’s graphs are dynamic and allow you to interact with them to see interesting things, it is reasonable that you’d want to share these insights with others –including those who may not have a copy of JMP. JMP has introduced an important new way to share your discoveries with others by letting you save your reports as interactive HTML 5. HTML 5 is a standard format recognized by all browsers and enables you to save your results which maintain much of the same interactivity you get in JMP.

To save a report as HTML 5 simply generate the results you would like to share, go to FileSave, select Interactive HTML with Data (under Save as Type), rename and locate your file as desired and select Save.

You may simply send this file, which can then be opened with any browser (Figure 7.17).

Figure 7.17 Interactive HTML5 Output in a Browser

image

Note: At the time of publication, Interactive HTML has been implemented in many, but not, all platforms in JMP.

Important Note about HTML 5 in JMP: When a file is saved in this file type, the data accompanies the graph. Although it may not be obvious, the data can be extracted from the file and the data cannot be encrypted. Thus, we caution users to be careful with sensitive or confidential data. Internal presentations may not be at issue, but sending Interactive HTML files externally may compromise confidentially.

7.5 Creating and Sharing Animated Graphs

Animated graphs are used to express trends among column/variable relationships. JMP provides the means to communicate a clear impression from a complex model and, with the Bubble Plot and Profiler, you can export these to other documents through Adobe Flash (or HTML5 in later releases). Unlike other graphs that are static or require direct interaction, this class of graphs brings an entirely new dimension to your presentation by allowing you to view changes in data relationships over time, range, or category–very much like a movie, except now, you can also interact with them.

In this section, we show you how to create a Flash file of a Bubble Plot and, in the following section, how to access and use these files in a PowerPoint presentation. We use the Bubble Plot to illustrate this section with time series data (steps for the Profiler are essentially the same; seeChapter 3). Animation of time series data is particularly effective because changes can be reflected over time.

Creating Exportable Animated Graphs

The Bubble Plot is found in the Graph menu. The window is shown in Figure 7.16. As you see, the Bubble Plot allows you to visualize up to six variables at once, including x- and y-axes, time, size of bubble, color gradient, and By. JMP allows you to also select a second subgroup for your points. For example, if you have sales data that contains both individual territories and regional information, you might want to toggle between Region and Territory. This feature allows you to see the graph for the region and to split that region into its territories on the fly to see their individual performance.

Note: If you have JMP 12, Interactive HTML 5 is an alternative to Flash for sharing a Bubble Plot with others. However at the time of publication, HTML 5 output is not compatible with PowerPoint. Since we will illustrate how to integrate an animated Bubble plot with PowerPoint in the next section, we will use Flash in this section. Check the book’s website for important updates concerning this and other sections.

1. Open your data file and select Graph ▶ Bubble Plot. Select columns to match desired roles (described in the following box). Only Y and X are required, but you will want to do more with this platform (see Figure 7.18).

Figure 7.18 Bubble Plot Launch Window

image

2. Using our chapter example SAT by Year, assign these columns to their corresponding roles:

Column

Role

SAT Verbal

>

Y

SAT Math

>

X

Region

>

ID

State

>

ID

Year

>

Time

% Taking

7) >

Sizes

Region

>

Coloring

3. After selecting OK (see Figure 7.19), locate the red triangle in the top left corner.

Figure 7.19 Bubble Plot Results

image

4. Under the red triangle, there is a menu option, Save for Adobe Flash platform (.SWF) (see Figure 7.20). Selecting this option saves the file (as a .swf file), along with a companion .htm file. Name your file and select Save.

Figure 7.20 Saving as a Flash File

image

5. It takes a few seconds, but you will see that a Flash version of that Bubble Plot now automatically appears in your browser on your desktop (See Figure 7.21). You can post this to a website.

Figure 7.21 Flash File Seen Through Browser

image

7.6 Placing Animated Graphs into PowerPoint

Before moving these graphs into PowerPoint, first save your graph as a Flash file as described in the previous section. Once you have done this, you will point to the .swf file from inside PowerPoint. This process is a little more involved, but we walk you through the steps here:

1. Save your Shockwave Flash (“.swf”) file. Note the file name and location on your computer.

2. Create a PowerPoint slide with a layout format that provides ample room to display the animation, such as Title and Content (see Figure 7.22).

Figure 7.22 Specifying Theme of a New Slide

image

3. Once you have created the PowerPoint slide, select the Developer tab (see Figure 7.23). If you don’t see the Developer tab, go to File ▶ Options, select Customize Ribbon, select Developer, then click OK.

Note: We are illustrating this example with PowerPoint 2013 and Flash 13. If you use other versions of PowerPoint or Flash, the steps may differ. If needed, consult PowerPoint Help or www.jmp.com/support/swfhelp/en/.

Figure 7.23 The Developer Tab

image

4. Select image (the More Controls icon) to view more controls (see Figure 7.24).

Figure 7.24 More Controls Icon

image

5. Select Shockwave Flash Object, and click OK (see Figure 7.25).

Figure 7.25 More Controls Dialog Window

image

6. On your PowerPoint slide, adjust the box to the right size to accommodate the Flash-animated graph. For this example, enlarge this small box (the one with the lines bisecting each corner or what looks like an X) to fill the entire lower panel of the slide (see Figure 7.26).

Figure 7.26 Specify the Size of a Flash Object

image

7. Right-click inside the box and select Property Sheet (see Figure 7.27).

Figure 7.27 Select the Property Sheet

image

8. Under Movie, specify the path to your .swf file (see Figure 7.28).

Figure 7.28 Specify the Path to the Animated File

image

9. When you are finished, close the window. Save your PowerPoint file.

When saving this file, be sure to identify it as PowerPoint Macro-Enabled Presentation in the Save as type drop-down menu, as shown (see Figure 7.29).

Figure 7.29 Save as a Macro-Enabled PowerPoint File

image

10. Select the Slide Show or Presentation icon (see Figure 7.30) and view the slide.

Figure 7.30 Select Slide Show Mode

image

Figure 7.31 Click Play

image

11. Click Play to see the animated graph in action (see Figure 7.31).

Figure 7.31a Flash Object Embedded in PowerPoint

image

7.7 Creating Dynamic Dashboards

One of the fundamental features of JMP is its ability to dynamically link multiple graphs and view selected rows or observations in any number of graphs. In the past, the challenge with this has been trying to understand relationships by viewing multiple graphs due to their separate platforms and results windows. A new feature allows you to combine several separate windows into a single window or dashboard (JMP documentation refers to these as Instant Applications, see Figure 7.32). You can save these dashboards as a script or application and, in most cases, as HTML 5 and share them with others. Let’s revisit the SATbyYear data table. In this data set, we’d like to better understand SAT Math scores spatially in a map, but also in relationship with SAT Verbal scores.

Figure 7.32 Creating a Combined Window

image

The first step in creating a dashboard is to create the individual graphs.

• In this example we created a Map in Graph Builder (Graph ▶ Graph Builder) by dragging the State column into the lower left box titled “Map/Shape” and then dragging SAT Math into the resulting US map.

• We created distributions of SAT Math and Region by using the Distribution platform (Analyze ▶ Distribution) and placing SAT Math and Region into the Y Columns role and selecting OK.

• We created the scatterplot of SAT Math and SAT Verbal by using Fit Y by X (Analyze ▶ Fit Y by X) and casting SAT Math into the Y role and SAT Verbal into the X role and selecting OK.

Once we have created the three graphs which will initially appear in separate windows, our next task is to combine them into a single results window*. To combine windows, locate the check box in the lower right hand corner of the results window (on Windows only), check the box (Figure 7.33), and repeat for the other windows you desire to include.

Figure 7.33 Select Windows to Combine

image

Next to the check box on one of the results windows, there is a down arrow button indicating a submenu. Click and Select, Combine selected windows (Figure 7.34).

Figure 7.34 Combine Selected Windows

image

This will create a single results window or dashboard that maintains the dynamic and interactive graphs you’re used to in JMP (see Figure 7.32). To save this dashboard to the data table, select Reports ▶ Script ▶ Save to Data Table (Figure 7.35 and see also section 7.9).

Figure 7.35 Saving the Dashboard to the Data Table

image

Note: The order in which the results display in the combined window (from left to right) corresponds to where your original individual windows appeared on your screen (from left to right) before you combined them. To specify a different order to the graphs in the combined window, click and drag your original results windows so they appear in the desired sequence from left to right. Then repeat this process of combining selected windows.

7.8 Using the Layout Option to Share Results

If you’d like to edit, annotate, or consolidate a series of static JMP graphs or results before printing, sharing, or moving them into another application, use the Layout platform. Layout lets you create a collection of graphics or output that you can print or paste elsewhere. The usual interactive JMP graphs are fixed after being placed into Layout.

Layout allows you to ungroup the elements of graphs and results and piece together only those components you need for your presentation. For example, if you’d like to change the title, remove some pieces of an analysis report, combine multiple graphs from different JMP platforms, or add annotations to elements of multiple graphs, Layout can help.

Let’s illustrate this feature with our SAT example introduced earlier. We used the Distribution platform to create histograms of ACT Score (1997) and Student/Faculty Ratio, noting that there might be a positive relationship between these columns (as the Student/ Faculty ratio increases, so do the ACT scores) (see Figure 7.36).

Figure 7.36 JMP Results Window with Annotations

image

So let’s answer this question by adding the appropriate additional analyses to the mix. Our first step after annotating the distribution screens is to move these graphs into the Layout platform:

1. Choose Edit ▶ Layout (see Figure 7.37). A new window is created with the header Layout: Untitled. Think of this new window as a poster board that you can lay out and annotate any way you like. Now you can add other graphs to this window with ease.

Figure 7.37 Launching the Layout Platform

image

2. Return to the data table and select Analyze ▶ Fit Y by X. Then select for ACT Score (1997) for Y and Student/Faculty Ratio (1997) for X. Click OK. From the red triangle, select Fit Line and observe the graph depicted by the relationship. Does it appear from the graph that as one column increases, another also increases or decreases? We now want to combine this scatter plot with the histograms noted earlier.

With the Selection tool, highlight the graphs and output you want to combine with the distribution graphs. Right-click and select Copy.

3. Go to the Layout: Untitled window, right-click, and select Paste.

4. With the Arrow tool, choose Edit ▶ Select All. An entirely new drop-down menu, Layout, appears. Choosing Layout ▶ Ungroup (see Figure 7.38) allows you to keep, delete, or move the elements of these two separate analyses as you see fit.

Figure 7.38 The Layout Menu

image

a. Use the Selection tool to change or delete individual elements.

b. Use the Arrow tool to move things around.

c. Use Lines, Annotate, and other tools as you would in other platforms (see Figure 7.39).

Figure 7.39 Layout with Multiple Platforms and Annotations

image

Note: With the Layout menu, you may also Align the contents into an efficient layout or Group (or regroup) separate elements together.

7.9 Using Scripts to Save or Share Work

In the previous section, we learned that Layout helps us capture static elements of our results, which is useful when you are pasting them into another document. However, you’ll often want to save or share your results in a manner that allows you to generate the same results again. JMP Scripts capture steps, procedures, or actions which allow you to re-run your past work, perhaps on new data. For example, you may want to go back to an analysis you’ve done and possibly add additional rows to your data table and re-run the analysis or even share your work with another JMP user who can pick up where you left off.

One of the things that even experienced JMP users might not realize is that JMP has a built-in scripting language that is always available in the background, which can capture the work you’ve done so that you can easily reproduce it. It is available by simply clicking on the menu.

From the red triangle of any platform or graph is a Script option. When selecting the Script option, you see a submenu.

1. Save Script to Data Table translates this work into a script and places it in the Table panel of the Data Table (see Figure 7.40).

Figure 7.40 Saving a Script to a Data Table

image

2. Go to the Data Table. You now see an item with the title of the platform you were using in the Table panel with a red triangle (Distribution in this case). Select the red triangle next to Distribution and Run Script (see Figure 7.41). You should now see exactly what you developed before. You can save and share these scripts (within the Data Table, in this case) or rename them to something more descriptive.

Figure 7.41 Running the Script

image

7.10 Summary

In this chapter, we learned about communicating with graphs and about sharing JMP graphs and files and moving them into other applications. We only scratched the surface in this chapter, but we tried to address the most common and basic functionality. As mentioned, there are excellent reference materials available, both within JMP and from books dedicated to these topics. For more information, see the Bibliography section in this book.