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
 Generating color list
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

couturier

France
291 Posts

Posted - 02/18/2015 :  03:57:22 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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


Edited by - couturier on 02/18/2015 07:53:56 AM

couturier

France
291 Posts

Posted - 02/18/2015 :  08:11:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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 ?
Go to Top of Page

charlieelectra

USA
1 Posts

Posted - 03/17/2015 :  06:06:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for the reply. I was looking to post the same question.
Go to Top of Page

SeanMao

China
288 Posts

Posted - 03/23/2015 :  06:19:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

couturier

France
291 Posts

Posted - 03/26/2015 :  10:20:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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 ?
Go to Top of Page

SeanMao

China
288 Posts

Posted - 03/31/2015 :  05:56:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Castiel

343 Posts

Posted - 04/01/2015 :  09:15:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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...)

妾+   午旦  妹罕妾  妾伊    用仇  妾/     岫ㄞ
 妾京用 仍巨  件 侈   件戶' 甘岫平   /欠  白岫妹
   併             艮          岫  奈 白   岫
                              岫
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