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
 How to use "layer.cmap" after "worksheet -p"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

gydlake2013

14 Posts

Posted - 01/22/2019 :  08:43:27 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 2018b and Service Release b9.5.5.409(Select Help-->About Origin):
Operating System:win7
Hi,
I intend to use:
worksheet -p 226 contour;
layer.cmap.setLevels();
layer.cmap.inc=3;
layer.cmap.updateScale();
The "worksheet ..." can generate the contour graph properly. But the layer.cmap parts doesn't work together in one run. The layer.cmap parts can only work in separate step (first run "worksheet -p ...", then select layer.cmap parts to run).
What commands are needed between worksheet and layer.cmap?
Thank you in advance!

yuki_wu

896 Posts

Posted - 01/22/2019 :  9:55:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Please try to insert this line between “worksheet -p” command and “layer.cmap” command:

sec -p 1;

Regards,
Yuki

OriginLab

Edited by - yuki_wu on 01/22/2019 9:55:52 PM
Go to Top of Page

Castiel

343 Posts

Posted - 01/22/2019 :  9:58:37 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by gydlake2013

Origin Ver. 2018b and Service Release b9.5.5.409(Select Help-->About Origin):
Operating System:win7
Hi,
I intend to use:
worksheet -p 226 contour;
layer.cmap.setLevels();
layer.cmap.inc=3;
layer.cmap.updateScale();
The "worksheet ..." can generate the contour graph properly. But the layer.cmap parts doesn't work together in one run. The layer.cmap parts can only work in separate step (first run "worksheet -p ...", then select layer.cmap parts to run).
What commands are needed between worksheet and layer.cmap?
Thank you in advance!



https://www.originlab.com/doc/LabTalk/ref/Layer-CMap-obj

The documentation says "When changing the following properties, you should call layer.cmap.SetLevels() to reset the color map, and then call layer.cmap.updateScale() to redraw the graph. Including: ..."

So you should not call setLevels(2) but before updateScale().


worksheet -p 226 contour;
// sec -pw %H;
layer.cmap.inc=3;
layer.cmap.setLevels(2);
layer.cmap.updateScale();


If the above script does not work, comment out the second line and try again.


                                          &&&&&&&&&
                                        &&&
                                       &&
                                      &  _____ ___________
                                     II__|[] | |   I I   |
                                    |        |_|_  I I  _|
                                   < OO----OOO   OO---OO
**********************************************************
Go to Top of Page

gydlake2013

14 Posts

Posted - 01/23/2019 :  02:19:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks to Castiel and Yuki Wu for the help!
Castiel's solution works well ("sec -pw %H" is not needed.).
It cannot work by only adding "sec -p 1" between worksheet and layer.cmap.
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