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
 How to mask some lines in a parallel 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

Hyunseung Kim

Republic of Korea
10 Posts

Posted - 08/18/2022 :  03:09:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: Windows10 2022b

I am a newbie of originlab.

How to mask some lines in a parallel plot?

In my workbook, there is a column including categorical value, "pass": 0 or 1.

I want to mask lines for data [ data["pass"] == 0 ] with grey color, while lines for data [ data["pass"] == 1 ] are colored with blue-red colormap.

Below is current state and I want to colormap lines with "pass"==0 grey.



Below is a similar style. pass==0 lines are colored grey:



Here are the similar figures: https://github.com/plotly/plotly.js/issues/2756

Edited by - Hyunseung Kim on 08/18/2022 07:13:25 AM

Cecilia_syy

65 Posts

Posted - 08/18/2022 :  05:49:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
Do you mean for data["pass"] == 1, you want to colormap to another column, for example column species_id? In such case, you need to
1. add another column, right click to open set column value.
2. fill dialog with IF(Col("pass")==0, 0, Col("species_id")), and OK
3. set line color map to this new column
4. in Colormap tab, set level to 1~3, set color fill for level<1 to grey.

Thanks
Cecilia
Go to Top of Page

Hyunseung Kim

Republic of Korea
10 Posts

Posted - 08/18/2022 :  06:10:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by Cecilia_syy

Hi,
Do you mean for data["pass"] == 1, you want to colormap to another column, for example column species_id? In such case, you need to
1. add another column, right click to open set column value.
2. fill dialog with IF(Col("pass")==0, 0, Col("species_id")), and OK
3. set line color map to this new column
4. in Colormap tab, set level to 1~3, set color fill for level<1 to grey.

Thanks
Cecilia



Sorry. I re-wrote it more clearly.

I want to make figure like above. But, I want to color some lines that "pass" ==0 as grey to emphasize "pass"==1 lines. And, I don't want to change the lines that "pass" == 1 (current Blue-red palette like above).

Please note that the column "path" is categorical variable; 0 or 1.

Thank you.

Edited by - Hyunseung Kim on 08/18/2022 06:25:37 AM
Go to Top of Page

snowli

USA
1433 Posts

Posted - 08/18/2022 :  09:25:43 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

You can add a new column and set F(x) cell with if() function.
E.g. my Pass column is E. My colormap value is in F.
I can add if(E=="1",F, -1) in the F(x) formula in G column so if Pass=1, return F value. If Pass=0, return -1 (some value outside the colormap range).

Then on Colormap tab of Plot Details, map -1 with gray.


Thanks, Snow

Go to Top of Page

Hyunseung Kim

Republic of Korea
10 Posts

Posted - 08/18/2022 :  10:37:16 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

Hello,

You can add a new column and set F(x) cell with if() function.
E.g. my Pass column is E. My colormap value is in F.
I can add if(E=="1",F, -1) in the F(x) formula in G column so if Pass=1, return F value. If Pass=0, return -1 (some value outside the colormap range).

Then on Colormap tab of Plot Details, map -1 with gray.


Thanks, Snow





Thank you for your help. It was so helpful!

*And also thanks to Cecilia. Now I understand what you mean. It was the same answer. Thank you!

Hyunseung

Edited by - Hyunseung Kim on 08/18/2022 10:57:53 AM
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