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
 Set a Palette in line plot with labtalk
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Pikno123

5 Posts

Posted - 01/31/2024 :  07:05:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello everyone, This is my first time posting, here I have a question about labtalk, I already used the code "plotxy iy:=(1:10,11:20) , plot:=200"to create a line plot,but I cant set a Palette like Fire or Rainbow with the code"palApply igl:=[Graph2]Layer1 fname:=system.path.program$+"Palettes\Fire.pal"".

But, I have tried to set the palettes in 3D Colormap surface or something else with the same code,it did work,so should I use another code or the line plot palettes cant be set with labtalk? In the past, I used to manually set up palettes for line diagrams,now I want to try something different.

YimingChen

1657 Posts

Posted - 01/31/2024 :  08:43:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Can you try the script below?

plotxy iy:=(1:10,11:20) , plot:=200;
layer.plot1.colorinc=3;
layer.plot1.colorlist$=Fire.pal;


James
Go to Top of Page

Pikno123

5 Posts

Posted - 01/31/2024 :  08:55:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
[quote]Originally posted by YimingChen

Can you try the script below?

plotxy iy:=(1:10,11:20) , plot:=200;
layer.plot1.colorinc=3;
layer.plot1.colorlist$=Fire.pal;


James





Thanks for your reply,I have tried your code,I'm sorry it didn't work,and I think the origin cant find the object of 'layer.plot1'.
Go to Top of Page

YimingChen

1657 Posts

Posted - 01/31/2024 :  10:48:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Is the graph in the front? By the way, what version of Origin do you have?

Go to Top of Page

Pikno123

5 Posts

Posted - 01/31/2024 :  10:54:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by YimingChen

Is the graph in the front? By the way, what version of Origin do you have?




Yes, and I also tried running the code in its own Script Panel, but my code can only work on the other types of graph except the line plot. My version is OriginPro 2021, maybe I need a later one?
Go to Top of Page

YimingChen

1657 Posts

Posted - 01/31/2024 :  11:13:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Please upgrade your Origin.
Go to Top of Page

Pikno123

5 Posts

Posted - 01/31/2024 :  1:43:36 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by YimingChen

Please upgrade your Origin.



The Window Limit is so fatal to me......maybe I should find another way to solve this problem, but still thank you!
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