Creating 3D Pie Charts

New PlotIT users often want to create pie charts, and this section introduces procedures that should make it easy to create exactly the pie chart you desire.

Making a 3D Pie Chart Using Local Data

A 3D pie chart is essentially a 2D pie chart with thickness and an aspect ratio added to give the impression of a three-dimensional cylinder, rather than a flat circle divided into sectors by radial lines.

The commands for creating 2D and 3D pie charts are basically the same, except 3D charts require specifying one or two more attributes within a dialog box.

Pie charts can be created using Quick, or they can be created using either the PowerBar Graph or Pie icons, or the menu command File/New Graph. The following steps will walk you through the process:

1. Select File/New Graph or click on the PowerBar Graph icon. PlotIT will display a graph window with no elements displayed, as follows:

Gsguide00000030.gif

2. Define the pie chart element by selecting Graph/Add Element from the Menu Bar. A dialog box will appear, as follows:

Gsguide00000031.gif

3. In the Specialty section, select the Pie option button. This tells PlotIT you are adding a pie chart element, which you will define further.

4. It's always convenient to have your graph elements named for easy recognition. So type a pie chart name,

tutorial pie chart

in the New Element Name #1 box.  The dialog box should look like this:

Gsguide00000032.gif

5. Select OK or Enter. PlotIT opens a second dialog box, like this:

Gsguide00000033.gif

6. We are making a 3D pie chart, so select the Auto 3D button. (For 2D charts, this is left unchanged.) When Auto 3D is selected, PlotIT gives the chart a default thickness of 1.0.

7. We will add a legend to this pie graph, and the Legend text box is for that purpose. In a pie chart, the legend usually describes each segment of the chart. In the next step we'll be entering random data: 45, 27, 56, and 12. Using the default Label Type, Percentage, we'll let PlotIT calculate each slice as a percentage of the total. So let's use the Legend to describe each data entry.

In the Legend text box, type

45 rabbits

and press Enter.  The dialog box should appear like this:

Gsguide00000034.gif

For the second line of the Legend, type

27 chickens

and press Enter.

For the third line of the Legend, type

56 ducks

and press Enter.

For the last line of the Legend, type

12 geese

but don't press Enter.  Once this step is done, it's time to enter data.

8. Select the Local Data >> button to display an extension to the dialog box as shown:

Gsguide00000035.gif

In this example, we're working with only four data slices although a maximum of ten are allowed using local data entry. (You must use a data file, if you wish to specify more than ten slices.) In the first data line, select the Explode check box, and in the data text box, type

45

but DON'T press Enter.  (If you do Enter, then return to the data entry dialog box by selecting Format... from the menu, then Local Data >>.)

By pointing and clicking, or with keyboard commands, move the cursor to the second local data line, and type

27

in the data text box.  Again, DON'T press Enter, but click on the down arrow to scroll to the next data entry line.

In this third line, type

56

in the data entry text box.

Again use the down scroll arrow to see the fourth data entry line, and type

12

in the data text box.  The screen should look like this:

Gsguide00000036.gif

9. Click on OK or press Enter. You should get the following chart:

Gsguide00000037.gif

Notice something missing? Where's the legend?

PlotIT considers the Legend a separate element. When we added the element Pie Chart, PlotIT let us specify what to place in the Legend, but didn't print it because the Legend hasn't been added yet as an element.

(You can confirm this by clicking on Select in the Menu Bar. PlotIT lists only one element, the tutorial pie chart. Of course--that's the only element added to this point, even though we've done a lot of defining of that element!)

10. Let's finish by adding the Legend element. From the Menu Bar, select Graph/Add Element. The following dialog box will appear:

Gsguide00000038.gif

11. As stated earlier, it's a good practice to give names to all elements, so type

LEGEND

in the New Element Name #2 space, and DON'T Enter.

12. Select the Legend option button in the Annotations section. Then press Enter or click on OK.

PlotIT will redraw the chart, then display another dialog box. Here is where you choose color, orientation, location, etc. of the legend.

13. For simplicity, accept the defaults by pressing Enter or clicking on OK. The following pie chart will be displayed:

Gsguide00000039.gif

Perfect? Not quite. The legend may be displayed too low or in a place not quite to your liking.

14. You could have changed the location when still in the dialog box in step 12, above, but PlotIT gives you a simpler option. With the mouse, you may click and drag the legend to the spot of your choice. Do that now. When done moving the legend, your pie chart might look something like this:

Gsguide00000040.gif

You now have created successfully a 3D pie chart with a legend. Notice that the pie slices that weren't exploded are touching, while the slice that had the Explode option selected is set slightly apart. The legend descriptions are keyed to match their corresponding slices in the chart.

PlotIT offers more options, comments, colors, labels, etc. Play around by adding, formatting, re-formatting, and deleting elements.

Data Files for Pie Charts

Pie charts may be created also from data files instead of local data entry in the extended pie chart dialog box (see preceding tutorial).

To use a data file for making pie charts, the data file must contain x and y values. The y values determine the pie slice value, and each corresponding x value indicates shading pattern and color of the pie slice. The complete shading pattern and color key is listed in the PlotIT User's Guide, in the section on pie charts.

PlotIT's Worksheet is used to make the pie chart data files. The following steps will introduce you to this process. This description presumes that you have a mouse on your system. If not, refer to the PlotIT User's Guide for instruction on using the keyboard to move around the Worksheet.

Making a Data File for a Pie Chart

To prepare a data file that will create a four-slice chart, similar to the preceding tutorial:

1. Using the Menu Bar, select File/New Worksheet, or click on the PowerBar Sheet icon. PlotIT will display a worksheet.

2. In cell A1, enter

11

and click on cell B1.  The number 11 indicates black color and horizontal fill pattern.

3. Enter the corresponding data:

45

and click on cell A2.

4. In cell A2, type

22

and click on cell B2.  The number 22 indicates red color and vertical fill pattern.

5. In cell B2, type the second data entry:

27

and click on cell A3.

6. In cell A3, type

33

and click on cell B3.  The number 33 indicates green color and forward, diagonal fill pattern.

7. In cell B3, type

56

and click on cell A4.

8. In cell A4, type

44

and click on cell B4.  The number 44 indicates blue color and backwards, diagonal fill.

9. In cell B4, type

12

and Enter or click on any cell.  The data entry is completed, and your worksheet should look something like the following:

Gsguide00000041.gif

10. Save the file by selecting File/Save, and typing an appropriate filename in the dialog box such as

PIEDATA1.DAT

and press Enter.  Your worksheet is now saved and should appear like the following:

Gsguide00000042.gif

Because the data file is saved, you may quit and close PlotIT, or use the data file immediately.

Using the Worksheet Data File to Make a Pie Chart

This process is similar to the first pie chart tutorial but with fewer steps for two reasons: 1. the data are entered already in the data file, saving data entry steps, and 2. a legend won't be created for this chart. The instructions also are less detailed for brevity. If you need more detail, refer to the earlier tutorial.

1. Select Graph from the PowerBar, then Graph/Add Element from the Menu Bar.

2. Select Pie in the Specialty section of the dialog box.

3. In the New Element Name #1 space, type

Pie Chart/Data File

and press Enter.  A new dialog box appears.

4. Select Auto 3D.

5. Type in the data file name:

PIEDATA1.DAT

and press Enter.  The graph appears as shown below:

Gsguide00000043.gif

Note: No slices are exploded in this graph. To explode pie slices, enter a negative x-value in the worksheet for the slices you wish to be exploded.