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
 Searching for a special plot
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

19102208

Germany
Posts

Posted - 07/30/2009 :  05:55:56 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic

I want to construct a special plot which looks like the following:

- main plot is a scatter plot
- a histogram of the x-value is at the top of
the upper axis.
- a histogram of the y-value is to the right
of the right axis.

Is there a possibility to do it with Origin?
Thanks for help.

Example is show here:
http://jn.physiology.org/content/vol79/issue3/images/medium/jnp.mr27f4.gif

Hideo Fujii

USA
1582 Posts

Posted - 07/30/2009 :  6:55:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Matthias,

You can create such graph in Origin relatively easily by merging three plots - a scatter plot and two histograms as layers into a graph, like a sample bellow.

--Hideo Fujii
OriginLab



Go to Top of Page

19102208

Germany
Posts

Posted - 07/31/2009 :  06:42:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks, but how exactly can I construct such layers into a graph?

With the "merge graph window" option or with the "layer managment" option?
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 07/31/2009 :  2:11:01 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

A little bit lengthy, but the following is the steps. (Note: Because your graph has per cent in Y axes, I used the column/bar plots instead of histograms. If you change the row data, you can "recalculate" (left-click the "padlock" icon in the graph) to update the bar/column plot correctly).

We will make a tutorial associated with the sample graph in the graph gallery. Also, I will suggest our developer to implement a built-in graph type to make a such graph easier.

What do you call the name of this type of graph?

--Hideo

==========================
1) Fill your row data to X & Y columns, say A(X) and B(Y), in the worksheet
2) Highlight A(X), and choose "Statistics: Descriptive Stat: Frequency Counts" menu.
3) In the Freqcounts tool, turn ON "Relative Frequency" and "Frequency in = Percent"; and turned OFF "Bin End", "Count" and "Cumulative Count". Click OK. The result sheet "FreqCounts1" is created in the worksheet.
4) Go back to the original data sheet. Highlight B(Y), and do 2) and 3) for this column. "FreqCounts2" sheet is created.
5) Make a scatter plot from A(X) and B(Y) in the original data sheet. (Graph1)
6) In FreqCounts2 sheet, highlight Freq(Y) column, and create a (horizontal) bar chart by "Plot: Column/Bar: Bar" menu. (Graph2)
7) In FreqCounts1 sheet, highlight Freq(Y) column, and create a (vertical) column chart by "Plot: Column/Bar: Column" menu. (Graph3)
8) Choose "Graph: Merge Graph Windows" menu. Click OK in the tool, and the merged graph is created. (Graph4)
9) Choose "Graph: Layer Management" menu, and choose "Size/Position" tab in the tool.
10) To move the (vertical) column chart on the top of the scatter plot, select "Swap" in "Option", "First Layer = 3", and "Second Layer = 1". Click "Apply" button (If you make a mistake, click "Undo" botton in the tool), and then press "OK".
11) To link X (vertical) axis of (horizontal) bar charts to Y axis of the scatter plot, double-click the bar plot to show Plot Details dialog. Select Layer2 in the left panel of the dialog, and select "Link Axes Scales" tab in the right panel. Select "Custom" for the "X Axis Link", and enter the mapping X1=Y1, and X2=Y2. Click OK.
12) To link X axis of (vertical) column charts to X axis of the scatter plot, double-click the column plot to show Plot Details dialog. Select Layer3 in the left panel of the dialog, and select "Link Axes Scales" tab in the right panel. Select "Staright(1 to 1)" for the "X Axis Link". Click OK.
Now, If you change the axis scale of the scatter plot (as a parent layer), scale of the column/bar chart will automatically follow.
13) Do cosmetic customizations, for example:
    a) To show (0,0) central axes in the scatter, double-click an axis to show Axis dialog, select "Grid Lines" tab, and turn ON X=0 and Y=0 "Additional Lines" check boxes for both Vertical and Horizontal axes in Selection.
    b) To make the frame of (vertical) column plot flatter in height, click inside the column plot (not on a column, but outside) to select the frame, click-and-drag downward to make the height shorter.
    c) To make the frame of (horizontal) bar plot narrower in width, click inside the bar plot (not on a bar, but outside) to select the frame, click-and-drag leftward to make the width narrower.
    d) To move three layers to the center all together, click inside the scatter plot (not on a data point, but not on it), and click-and drag to the appropriate position.
    etc.
==========================

Edited by - Hideo Fujii on 07/31/2009 2:54:40 PM
Go to Top of Page

19102208

Germany
Posts

Posted - 08/04/2009 :  06:40:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks very much.

1. I have still problems with the arrange settings.

Currently there is Column:2 and row:2 setting. The plots are arranged
like this:

plot 1 - plot 2
plot 3 - nothing

it should be

plot 1 - nothing
plot 2 - plot 3

2. In the "link axes scales" there is a "link to" drop down option. What to choose there?
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 08/04/2009 :  2:46:33 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
1. By doing 8) "Merge Graph Windows", the result in my test was configured as you pointed out:

plot 1(Scatter) - plot 2 (Bar)
plot 3(Column) - nothing

Thus, Plot 1(Scatter) must be the "parent" layer linked with other child bar/column plots.

Then, doing 10) "Swap" layer 3 and layer 1 in "Layer Management", I got:

plot 3(Column) - nothing
plot 1(Scatter) - plot 2(Bar)

as the Plot 2 follows the movement of Plot 1.

It didn't happen in your case? Please make sure the order of creation of individual plots so that you are sure that Layer1(parent)=Scatter, Layer2=Horizontal Bar, and Layer3=Vertical Column.

2. Assuming that you correctly made the scatter as a "parent" layer in Layer 1, "Link to" should be Layer1.

--Hideo
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