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
 color data in scatter plot according to 3rd column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Govc

Slovenia
6 Posts

Posted - 07/17/2014 :  04:58:15 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.5.1 or 9
Operating System: Windows 7, 64 bit

Hi,
I have 3 columns (x,y,label) and I would like to color data in scatter plot according to label value (if label is 100 color it red, if label is 500 color it green,...).
Is there a way not to do that manually point by point?
How to put these new colored data into legend?
Thank you.


Here is example of my data

X Y Label
0,01 1 100
0,02 0,95 200
5E-4 1,00667 1
0,05 0,76 100
0,05 0,73333 200
0,05 0,79333 500
0,1 0,5 100
0,1 0,5 200
0,1 0,508 500
0,1 0,54533 1000
1E-4 0,98667 1
0,01 0,98667 100
0,1 0,725 100
0,1 0,73 200
0,1 0,76 500
0,1 0,81 1000
0,1 0,9 100
0,1 0,95 200
0,1 0,908 500
0,1 0,88 1000

Kathy_Wang

China
159 Posts

Posted - 07/17/2014 :  05:19:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

First set the column of "Label" as categorical (right click on column header and choose Set as Categorical, then use this column for "color indexing" (http://www.originlab.com/doc/Origin-Help/PlotColor-DatasetControl#Indexing) in the Symbols tab of the Plot Details dialog.

As for the legend, with Origin 9, you could add a legend for the categorical values via menu Graph:New Enhanced Legend, but note that it has been renamed as the "Legend for Categorical Values" in our latest version 9.1, you may refer to our online help file based on latest version:

http://www.originlab.com/doc/Origin-Help/Legend-CateData

In addition, starting from Origin 9.1, you could customize the color indexing list in the color list tab (http://www.originlab.com/doc/Origin-Help/PD-Dialog-ColorList-Tab).



Kathy
Originlab
Go to Top of Page

Govc

Slovenia
6 Posts

Posted - 07/17/2014 :  10:13:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you, this is exactly what i needed.

From here on, is it possible to connect the same colored points from lowest to highest?

thanks again :)
Go to Top of Page

snowli

USA
1386 Posts

Posted - 07/17/2014 :  1:53:56 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

If you want to connect the same color points, I would recommend
1. Use Worksheet: Unstack Columns to unstack XY data based on info. in Label. Please check the Recalculation mode to Auto so whenever there is change in source sheet, it will be reflected in the unstack result and graph plotted from it.

2. Then Highlight the all unstacked columns in new worksheet to plot them as line+symbol plot.

Then data with same label will be plotted with same color, and even same symbol shape and connected. You can double click the plot and go to Group tab to set the Symbol shape increment to None if you want all use the same shape.

BTW, if you want to connect the line from lowest to highest, in original worksheet, you can right click the Y column and choose Sort Worksheet: Ascending.

The unstack result and graph should update automaticaly.

Thanks, Snow Li
OriginLab Corp.

Edited by - snowli on 07/17/2014 2:28:10 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