Author |
Topic |
|
benzo
9 Posts |
Posted - 04/24/2012 : 08:48:41 AM
|
Origin Pro 8.5 SR1 b161 (academic version).
Hi. I am trying to create a scatter plot of compound concentrations taken from patients at different type points (each patient has a different set of time points).
My problem is that I can't seem to work out how to plot all the data into one scatter graph and have each patient's scatter points a single colour so that I can determine from which patient the points are derived from.
This is an example from the data where I am trying to plot Concentration verus timepoint scatter graphs for the 2 patients onto 1 graph, but with different colour scatter points for each patient (I put the forward slashes to make it easier to separate the columns for this forum posting):
Patient Number///Time point///Concentration (uM) 1/// 9.4/// 1.39 1/// 26/// 1.08 1/// 30/// 8.24 1/// 32.1/// 11.15 1/// 33/// 12.51 1/// 33.4/// 15.48 1/// 33.4/// 13.58 1/// 33.5/// 14.74 2/// 10.5/// 3.82 2/// 29.3/// 6.56 2/// 33.2/// 9.92 2/// 32.4/// 9.36 2/// 33.4/// 11.27 2/// 34.4/// 19.43 2/// 35.5/// 16.03 2/// 36.4/// 15.64
Thanks for your help |
|
Hideo Fujii
USA
1582 Posts |
Posted - 04/24/2012 : 4:08:56 PM
|
Hi benzo,
You can use the "Color Mapped" graph type in Origin. To make a sample like the sample below, you need to pout your Patient# column at the end of the worksheet, and X and Y columns before as in the Origin's convention. Once you have this worksheet organization, highlight all columns, and select "Plot: Symbol: Color mapped" menu.
Once you have created the color-mapped plot, you can customize the symbol color in the "Colormap" tabin the Plot Details dialog box. (e.g., number of levels, level values, color at a level, etc.).
Hope this works for you.
--Hideo Fujii OriginLab |
|
|
benzo
9 Posts |
Posted - 04/24/2012 : 6:08:16 PM
|
Hi,
Thanks for this help. This in part helps me. The last thing I would like if possible is to list in the legend box the color/symbols that represent the patient data sets. So instead of 'B', I'd like: Red square 1 Blue squre 2
etc.
Thanks. |
|
|
couturier
France
291 Posts |
Posted - 04/25/2012 : 05:57:55 AM
|
Right click on your graph and select "Enhanced Legend" |
|
|
Hideo Fujii
USA
1582 Posts |
Posted - 04/25/2012 : 2:55:38 PM
|
Hi benzo,
The "enhanced legend" Couturier pointed out works when you created scatter plot, and the color was indexed (you set the symbol color to "Index Color <CategoryCol>". However, you loose the freedom of your choices of colors. Including this "Index Color" method, there are various ways to make similar graphs, but each has own advantages and disadvantages. I list the four methods below, and see the attached screenshot.
1) Color-Mapped plot [Graph1] ==>Colors customizable. Legend needs manually updated
This is the method I explained in my previous post. To make the legend which contains every class, CTRL+Double-Click the data point which currently not included in the legend (BLUE in Graph1) to create a single-point plot. Then, recreate the legend. Customize the legend to have proper legend text.
2) Plots from an Unstacked Worksheet [Graph2] ==>Colors customizable, Legend created automatically. But, it needs an unstacked worksheet.
If you can organized your worksheet "unstacked" [Book2], you can simply plot datasets. Legend automatically get the proper labels from the Comment header row. (You can convert Book1 to Book2 by "Worksheet: Unstack Columns" menu.)
3) Plot from Partial Ranges [Graph3] ==>Colors customizable, Legend needs manually updated
To make this, highlight a block of Y cell block for Class=1, and plot a Scatter plot from it. Highlight Y cell block for Class=2. Move the cursor on the side edge of the highlighted block (cursor shape changes to graph shape), and left-click-then-drag-and-drop onto the graph. Recreate the legend, then customize it for the proper labeling.
4) Plot with Categorical data, and make an Enhanced Legend [Graph4] ==> Colors NOT customizable, Enhanced legend updated automatically.
This is what Couturier suggested. Change the class column to "categorical" [Book3]. (Highlight the column, then choose "Column: Set Categorical" menu.) Categorical column is a text column, so you can put not only patient numbers, but any labels. Make a color-mapped plot like in Case 1). Choose "Graph: New Enhanced Legend" menu to create an enhanced legend.
In short, plots from an unstacked worksheet is most flexible, if you accept your worksheet organized as unstacked (Book2). If you don't mind the changing the colors, you can set the class column as Categorical. Enhanced legend can take care of the legend labels.
That's all what I can think of, so far...
--Hideo Fujii OriginLab |
Edited by - Hideo Fujii on 04/25/2012 2:56:19 PM |
|
|
|
Topic |
|
|
|