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
 LabTalk Forum
 Generating color list

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
couturier Posted - 02/18/2015 : 03:57:22 AM
Origin Ver. and Service Release (Select Help-->About Origin): 2015 SR1
Operating System:win7 64bit

Hi,

I have 20 cols. Each col has an associated parameter (which can be in a col header or in a separated 20 rows col).
I'd like to plot those cols and set lines color according to this associated parameter.

Right now, I plot the parameters in a temporary scatter graph, set symbol color as self colormap, get each point color and finally set the colors to the line plots.

Is it possible to speed things up and directly generate a color list, based on the parameters and a given colormap ?

Thanks

6   L A T E S T    R E P L I E S    (Newest First)
Castiel Posted - 04/01/2015 : 09:15:07 AM
Apply palette to your graph. There's an x-function for you to create a palette. (It's less straightforward though, comparing to the one in MATLAB.)

After setting symbol/line color as colormap of some column data, you can change a layer's palette through toolbar. I don't recall if it's possible to apply a palette to a single plot (layer cmap? doubted). Maybe you can getformat() of a dataplot in origin-c for details. (travelling without pc, can't help...)

©c¡Ï   ¤È¥¹  ©f¨u©c  ©c¥ì    ¥Î¤³  ©c/     ©¦£¯
 ©c¨Ê¥Î ¤´¥¨  ¥ó ¨×   ¥ó¤á' ¥Ì©¦¥­   /¤í  ¥Õ©¦©f
   ¨Ö             ¦á          ©¦£þ  ©` ¥Õ   ©¦
                              ©¦
SeanMao Posted - 03/31/2015 : 05:56:40 AM
Hi,

Currently there seems no better way to colormap a set of grouped data plots using dataset in another column.

Regards!

Sean

OriginLab Tech. Service
couturier Posted - 03/26/2015 : 10:20:40 AM
Thanks Sean for your answer.

The point is not setting color curves once the colors are known, but precisely how to compute the colors.

Another way to expose the problem:
I have a col I want to use for color mapping.
Is there a way to generate a dataset that will store the color values, without having previously generated such a plot ?
SeanMao Posted - 03/23/2015 : 06:19:09 AM
Hi,

Suppose you have color index in column Comments, you can run the following code to color data plots in active layer to use the increment list in column comments:


// Suppose worksheet name is Book1, sheet name is Sheet1
layer -c; // Count how many data plots in active layer 
          //and put  value in Count variable
for (nn = 1;  nn <= count; nn++)
{
	layer.plot = nn; // Active nnth data plot
	set %c -c %([Book1]Sheet1!wcol($(nn))[C]$);
}


Try and see whether this is what you want.

Regards!

Sean

OriginLab Tech. Service
charlieelectra Posted - 03/17/2015 : 06:06:08 AM
Thanks for the reply. I was looking to post the same question.
couturier Posted - 02/18/2015 : 08:11:13 AM
Not sure the explanations were clear. Another way to formulate the question would be:

I have 20 grouped plots. If I set line color increment to follow a palette, the color follows the plot index.
Is it possible to have the palette follow another dataset (whose size=number of plot) or custom row header ?

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