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

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
Hyunseung Kim Posted - 08/18/2022 : 03:09:24 AM
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
4   L A T E S T    R E P L I E S    (Newest First)
Hyunseung Kim Posted - 08/18/2022 : 10:37:16 AM
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
snowli Posted - 08/18/2022 : 09:25:43 AM
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

Hyunseung Kim Posted - 08/18/2022 : 06:10:39 AM
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.
Cecilia_syy Posted - 08/18/2022 : 05:49:52 AM
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

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