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
 defining symbols for scatter 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

malgoska

Poland
36 Posts

Posted - 07/16/2014 :  06:55:43 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin 9.1 (64 bit)
Operating System: windows 8

Hello,
I wonder whether there's a way to do the following:
Let's say I have a worksheet with 4 columns containing different quantities as a function of one x (col(A)). I want to plot several combinations of them (e.g col(B) and col(C), col(C) and col(D), col(B) and col(D)). On each graph I'd like to have the same symbol representing corresponding quantity (let's say blue squares for col(B), red circles for col(C) and blue diamonds for col(D)). Of course I can do this manually, but it would be great if there was a possibility to attach plot type to column of data so that after selecting the columns to plot the symbols and colors would be already defined.
I'd appreciate any ideas how to do this in a more automatic way.
Regards,
Malgorzata

Hideo Fujii

USA
1582 Posts

Posted - 07/16/2014 :  11:03:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Malgorzata,

You can store the plot attributes in the header rows of the Y column in the worksheet. For example, you can do:

1) Highlight any header row (e.g., Comments), right-click, and choose "Insert: User Parameters" flyout. Rename the name of the new header row by right-clicking it, and choose "Rename" flyout, and enter the name e.g., "color".

2) Enter the attribute value at each column's header row according to the table:
(color): http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:List_of_Colors
(shape): http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:List_of_Symbol_Shapes

3) Make all graphs of data combinations.

4) Run the following script:
doc -e P {  //looping over graph windows
  layer -gu;  //ungroup
  doc -e D {  //looping over plots in the window
    set %c -c value(%c[color]$); //symbol color
    set %c -k value(%c[shape]$); //symbol shape
  }
}
Please see the sample screenshot below:



Hope this serves your project.

--Hideo Fujii
OriginLab
Go to Top of Page

malgoska

Poland
36 Posts

Posted - 07/16/2014 :  12:31:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you! This is exactly what I needed :)
Regards,
Malgorzata
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