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
 colors in contour plots
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

letay@ise.1

GERMANY
3 Posts

Posted - 06/27/2002 :  12:39:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi everybody,

I am trying to generated a contour plot from a matrix by a labtalk script.
The problem is, that I can not set the zvalues and the color as needed.
I tried two ways:
1) I setup my plot with the desired colorabove, high, low, missing values as needed, saved it to a template and than used this template to generate the contour plot. unfortunately it seems so, that the color settings (layer.cmap....) are not stored in the template. They are reseted to the default values.

2) I tried to set the cmap values my self with layer.cmap.low... One thing is that zmax and zmin only set the first and last value of the scale but do not modify the values between the limits. the same is true for colorhigh and colorlow. they also only modify the highest and lowest value but not the whole scale. I tried several execution orders of the cmap-commands but each time cmap.numcolors is executed all other settings are reseted to their default values!?!

3) I can set all z and color values by hand with a nice for loop like this:

for(i=0;i<=LAYER.CMAP.NUMCOLORS;i+=1){
LAYER.CMAP.Z$(i+1) = LAYER.CMAP.ZMAX-(LAYER.CMAP.ZMAX-LAYER.CMAP.ZMIN)/LAYER.CMAP.NUMCOLORS*i
};

but how can I generate a rainbow color from blue to red?

Anyone who fixed this problem?

regards
gergoe letay

P.S.: I am running Origin 6.1R4 german version on Win2000
 

Laurie

USA
404 Posts

Posted - 06/28/2002 :  08:56:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
When saving a contour plot, the levels (color map) are not saved because these updatae when you plot new data.

Create the graph and set the levels the way you want, then run the following LabTalk command:

layer -cm s filename;

to save these settings to a file with the name, filename.

Now create a new plot, and use layer -cm l filename; //load

OriginLab Technical Support
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