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 for Programming
 LabTalk Forum
 script to generate symbol color by index
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Karsten8

Germany
23 Posts

Posted - 09/10/2024 :  10:22:25 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release: 2024b
Operating System: Windows Server 2022

Dear Origin-Team,

I want to plot a graph and use the column N("devicename") to
change the color of the symbols depending on their text in this column.

What do I have to add to the script to implement these color modifications. I have to set:
- change the color index from single color to plot by points
- be able to target the color list (here I use clasic)
- set the color option to index and defince the column N("devicename") as index-source

Thats the script I use so far without the index-color-column option:
plotxy iy:=("V10")[($(varstart)):$(varend)] plot:=206 color:=$(varcolor) legend:=0 o:=[Key1]1!;

Is there a possibility to get the script that is needed to generate a graph? For example I have a modified graph and now I can ask origin: give me the code to generate this graphe with its currents settings.

Thanks and best regards,

Karsten8.

YimingChen

1606 Posts

Posted - 09/10/2024 :  1:57:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To index symbol color to a column, you can try the example script:
set %C -csen Book1_E;

https://www.originlab.com/doc/LabTalk/ref/Set-cmd#Option_for_Data_Plots

You can load a saved graph template with desired settings in plotxy xfunction:
https://www.originlab.com/doc/en/X-Function/ref/plotxy

James

Go to Top of Page

aplotnikov

Germany
162 Posts

Posted - 09/11/2024 :  02:46:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I'm not quite sure what exactly is needed, but it may be about functions to handle categorical datasets:
https://www.originlab.com/doc/en/LabTalk/ref/Category-func
https://www.originlab.com/doc/LabTalk/ref/Catindex-func
https://www.originlab.com/doc/en/LabTalk/ref/Cattext-func
etc.

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