6.12.13 3D Bar with Labels

Contents


Video Image.png Video Text Image.png Website blog icon circle.png Blog Image 33x33px.png

Summary

This tutorial will show you how to create the following graph:


3D Bar With Labels first final.png

Minimum Origin Version Required: 2015 SR0

What You will learn

This tutorial will demonstrate how to:

Steps

This tutorial is associated with <Origin EXE Folder>\Samples\Tutorial Data.opj.

Creating a Flat Color Fill Surface from a Matrix

Open Tutorial Data.opj and browse to the folder 3D Bar with Labels.

  1. Activate the Matrix MBook1B.
  2. From the Origin menu select Plot > 3D: 3D Color Fill Surface to create a 3D plot that will have Speed Mode turned on:
    3D Bar With Labels graph1.png
  3. With the graph window activated, choose the menu Graph: Speed Mode to open the Speed Mode dialog. Set Speed Mode to Off and click OK button to trun off the speed mode.
    3D Bar With Labels graph1a.png
  4. Double-click on the graph to open the Plot Details dialog, go to Surface tab and enable the Flat option.
    3D Bar With Labels Plot Details2.png
  5. On the Fill tab, click the Contour fill from matrix radio button to set the colors according to the matrix itself. Deselect the Fill back surface check box as well.
  6. Next click the Colormap/Contours tab to set the matrix colors and click Level.... In the Set levels dialog that opens, select the #Major Levels radio button and set it to 2. You can see the Total # of Levels will be set to 2 and click OK to close the dialog.
    3D Bar With Labels Set Levels dialog.png
  7. Click on each color level under the Fill... heading to open the Fill dialog and choose the color. Set the three colors to Black, Gray and a customized blue with an RGB of 0, 64, 128 as shown below:
    3D Bar With Labels Fill Color.png
  8. On the Mesh tab, clear the Enable box and click OK to close the dialog box.
  9. The graph will resemble the image below:
    3D Bar With Labels graph2.png

Adding and Customizing 3D bars and labels

  1. With the graph active select Insert: Plot to Layer: 3D - Bars on the Origin menu. This opens the Select from Sheet dialog box.
  2. With the left key of mouse pressed to select columns A1, G1 and D in workbook Book2B. Click OK to add the plot to the current layer:
    3D Bar With Labels Plot setup.png
  3. To customize the 3-D bars, double-click on them to open the Plot Details dialog box. On the Pattern tab, set the border color to Wine and the fill color to Red. On the Outline tab set the Width (in %) to 10. Click Apply
  4. Next, select the Label tab and check the Enable box.
  5. Set the Label Form as Col(B):"City" so that labels display the city name located in Col(B) of the worksheet.
  6. Set the Position in Z as Top Outside with an Offset of 10 and set the Orientation in the YZ plane. Set the other controls as shown below and click OK to close dialog.
    3D Bar With Labels Label Settings.png
  7. Double-click one axis and go to the Scale tab, set From and To for all three axes as below. Click OK to exit.
    Tutorial 3D Bar with Labels 09.png
  8. Double-click on the graph again and in the Plot Details dialog box, select the Graph1 option in the left panel. On the Display tab set the Color to LT Gray. Click OK to close dialog.
  9. Double-click the Z axis title and change it to Population (Million).
  10. The final graph should resemble the one shown below:
    3D Bar With Labels first final.png
  11. Since this is a 3D OpenGL Graph, you can click on the graph and select Rotate Mode button on mini toolbar to use the mouse to rotate the graph.
    3D Bar With Labels rotate mode.png