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
 All Forums
 Origin Forum
 Origin Forum
 Plotting 2D multiple series from same columns

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
cgreisen Posted - 07/15/2004 : 06:00:55 AM
Hi there,

I have a bunch of data in columns schematically as follows

SampleID X Y
A 1 2
B 1 0
B 3 4
C 0 2
A 2 3
C 1 4

Now I want Origin to recognize that this is 3 different data series (A,B,C) that should be plotted as 3 different line+scatter into the same graph. How can I do that ?

Regards,

Christoffer Greisen
2   L A T E S T    R E P L I E S    (Newest First)
sammi.song Posted - 07/16/2004 : 03:36:10 AM
Hi Christoffer,

There is another way to do this work if I did not make any misunderstanding.

1.Select View: Toolbarsˇ­ menu to open the Customize Toolbar dialog box. On Toolbar tab, check the ˇ°Columnˇ± checkbox to display the Column Toolbar in workspace. Close this dialog.
2.Right click on the SampleID Column to Set this column As Y, and click ˇ°Move to Lastˇ±button on Column Toolbar. Then please arrange your data columns as follow:
X[X] Y[Y] SampleID[Y]
1 2 A
1 0 B
3 4 B
0 2 C
2 3 A
1 4 C
3.Highlight the first two columns---X[X] and Y[Y], in the worksheet and plot a Line + Symbol graph.
4.Select Format: Plotsˇ­ menu to open the Plot Details dialog. Now, the active tab is Symbol.
5.Change the Symbol size to 18. Check the ˇ°Show Constructionˇ± checkbox and choose col(SampleID) from the ˇ°Shapeˇ± drop-down list. Click OK to close Plot Details.
6.Right-click on the default legend, and choose Properties to bring up the Text Control dialog box. Place the following text in the edit box and click OK.
\l(1,0) A
\l(1,2) B
\l(1,4) C

BTW, there is a Categorical Data.opj under our Samples\Graphing\2D Plots\ folder FYI.
Hope they are useful.

Thanks,
Sammi

Edited by - sammi.song on 07/16/2004 03:45:14 AM
Mike Posted - 07/15/2004 : 11:01:02 AM
Hi Christoffer:

If I understand correctly, you want all XY pairs of Sample ID A to plot as a line + symbol plot, all XY pairs of Sample ID B to plot as a second line + symbol plot, and all XY pairs of Sample ID C to plot as a third line + symbol plot (all plots in the same graph).

Since Origin 7, Origin has had limited categorical data support, but given your requirements and the way that your data are arranged, I wouldn't bother with this feature. I would do this:

  1. With your worksheet active, select Analysis:Extract Worksheet Data. In the if text box, enter this relationship:


  2. col(A)[i]$=="A"

  3. Click Do it.

  4. --> The worksheet data having the letter "A" in rows 1 to n, are extracted to worksheet DataN.
  5. Repeat steps 1 and 2 for Sample ID = B and C, substituting "B" and "C" for "A" in the above relationship. You'll now have three worksheets of XY pairs -- one for Sample ID = A, one for Sample ID = B and one for Sample ID = C.

  6. Highlight the X and Y columns in the worksheet that contains the "A" data and click the line + symbol button (make sure that these two columns are designated as X and Y).

  7. Right click on the layer icon in the upper-left corner of the graph. If you are using Origin 7 or earlier, select Add/Remove Plot from the shortcut menu. If you are using Origin 7.5, select Layer Contents from the shortcut menu.

  8. Add your "B" and "C" data -- probably identified as worksheetName_c -- into the Layer Contents(again, make sure that your X and Y data are designated as such).

  9. SHIFT+Select all data sets in Layer Contents and click Group, then OK.

  10. Click the Rescale button on the Graph toolbar.

  11. --> All 3 plots are displayed as line+symbol plots in a single graph window.
  12. Click the New Legend button on the Graph toolbar.

  13. --> All 3 data sets should now show in the legend.


You could do this more elegantly with a script, but I think this will give you what you want.

Mike
OriginLab

Edited by - Mike on 07/15/2004 11:01:27 AM

Edited by - Mike on 07/15/2004 11:03:12 AM

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000