The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Bar graph with z axis
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

yjiean

USA
10 Posts

Posted - 11/30/2011 :  2:07:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi

I have a 3 dimensional data set in x, y and z direction. I am trying to plot the x and y in a bar graph and am thinking of having the z axis (representing the height of the bars) in different colors depending on their respective heights (like a contour map). I have been trying for some time now but do not have a solution for this. How can I combine these together? Many thanks.

Hideo Fujii

USA
1582 Posts

Posted - 11/30/2011 :  5:51:49 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi yjiean,

If your data is organized as a XYZ worksheet, you can first convert it to a matrix ("Worksheet: Convert to Matrix" menu), then make a 3D bar chart ("Plot: Wire/Bar/Symbol: Bars" menu) from it. The bars would be color-scaled by their height.

--Hideo Fujii
OriginLab
Go to Top of Page

yjiean

USA
10 Posts

Posted - 12/02/2011 :  5:04:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Hideo

I actually have a floating bar graph in the x and y axis. I have 2 columns of y values for the start and end values of the bar. Is there a better way to arrange the data points? I am still having trouble making the plot. Thanks.

y y z x
1 6 2 1
11 21 23 2
11 23 24 3
13 21 8 4
13 23 8 5
22 32 4 6
24 32 3 7
33 43 17 8
35 43 23 9
44 58 43 10

Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 12/02/2011 :  5:22:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi yjiean,

As the convention (though you can work-around) in Origin, 
always you find easier to have columns X column at left of 
Y columns (and Z at right of Ys) such as:

x       y       y       z
1	1	6	2
2	11	21	23
3	11	23	24
4	13	21	8
5	13	23	8
6	22	32	4
7	24	32	3
8	33	43	17
9	35	43	23
10	44	58	43

If you simply want to plot 2D Floating Bar, highlight 
two Y columns (at 2nd and 3rd), and choose 
"Plot: Column/Bar/Pie: Floating Bar" menu - that's it. 

--Hideo Fujii
OriginLab


Edited by - Hideo Fujii on 12/02/2011 5:22:39 PM
Go to Top of Page

yjiean

USA
10 Posts

Posted - 12/02/2011 :  6:23:01 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Hideo

Thank you for your help. Is there a way to color code the floating bars depending on their z values? I am thinking of white ( z = 0) and red ( z = 50) and different shades of red for values in between. Or to display the z values as heights of the floating bars?
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 12/05/2011 :  2:37:17 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi yjiean,

When you set the bar's fill color ("Pattern" tab in Plot Details dialog), you can choose "Color Mapping> Col(D)" (when your Z values are in the column D) for Color. Then you choose "Colormap" tab, and assign the value ranges, number of levels, and assigned color to the corresponding level.

For how to use this color mapping, please read the Origin help document at the section:

UserGuide> Customizing Your Graph> Customizing Plot Elements>
Plot Details Controls> The (Plot Details) Color Map tab

or,

UserGuide> Customizing Your Graph> Customizing 3D Graphs>
Contours> The (Plot Details) Color Map/Contours Tab

--Hideo Fujii
OriginLab
Go to Top of Page

yjiean

USA
10 Posts

Posted - 12/05/2011 :  3:39:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Hideo

I followed your directions but the 'colormap' tab under the plot details dialog was not an available option when I have the plot as a floating bar graph. I tried changing the naming, or adding a dulicate z axis behind each y axis but it did not work. The 'colormap' option was only available when I plot a simple bar graph (NOT floating, with only 1 y axis values). I feel that I am missing 1 parameter here. Your help would be very much appreciated.

Jie An
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 12/05/2011 :  4:02:46 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Jie An,

Did you choose "Color Mapping" in the Pattern tab for the bar colors?
If you did so, and you still have the problem, I guess that because your Origin version is too old. As far as I tried in ver. 8.x, Colormap tab is available when I set the Color Mapping.

--Hideo Fujii
OriginLab
Go to Top of Page

yjiean

USA
10 Posts

Posted - 12/06/2011 :  11:56:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Hideo

Thank you for your help so far. I updated my version of OriginPro to 8.6 and the color map works. I am now trying to add a color scale to the plot from 'Graph: New Color Scale', but it is not highlighted. According to the instructions, for the scale to show, the active data plot is color mapped and a color scale is not already displayed. How do I make sure that the active plot is selected? Clicking on the plot does not seem to work.
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 12/06/2011 :  4:08:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Jie An,

Sorry, but unfortunately currently Origin has a limitation such that the floating bar/column cannot produce its own color scale. I will request to our developers to make it available in the future release.

There is a work-around, which was found by my colleague:

1) Right click in Layer icon and choose the 2nd plot to make it as active.
2) Now, the Color Scale tool button (or "Graph: New Color Scale" menu, or corresponding shortcut)should be selectable. Choose it.
bar will be active. (See the attached screenshot.)



--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 12/07/2011 1:48:19 PM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000