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 for Programming
 Forum for Python
 Assigning different Color and Symbol for Datapoint

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
Salman4750 Posted - 06/22/2020 : 08:05:02 AM
Hello,

This is the code i am using to plot a Scatter Plot.

name = Oapp.CreatePage(Oapp.OPT_GRAPH,"Scatter Plot","Graph")
gp = Oapp.GraphPages(name)
gpl = gp.Layers(0)
for i in range(totalColumnsno-1):
gpl.AddPlot(rng[i] , 201)


I have plotted five variables using OriginExt without using pre-defined Templates. But now I am wondering how can I assign different Colors using OriginExt to each Variable during plotting a scatter plot of different variables using RGB scheme and how I can assign different symbols to them. I have tried to assess the colormap but it's not working for me. I would be very thankful if someone can help me with this.


Thank you


salman
2   L A T E S T    R E P L I E S    (Newest First)
Salman4750 Posted - 06/23/2020 : 7:09:27 PM
Hi Chris Drozdowski,

Thanks for your reply. it's really helpful for me.

Thanks,


salman
Chris D Posted - 06/23/2020 : 09:23:29 AM
Hi,

Various classes in OriginExt implement an Execute method that can execute a LabTalk statement (in string form) in the context of the object (e.g. a GraphLayer).

So you could create LabTalk `set` commands to customize your plots. E.g.:

gpl.Execute('layer.plot=2') # Activate 2nd plot.
gpl.Execute('set %c -c color(255,0,0)') # Set color to red



Here are docs for the set command.
https://www.originlab.com/doc/Labtalk/Ref/Set-cmd


Thanks,
Chris Drozdowski
Originlab Technical Support

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