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
 Forum for Python
 Colormaps & 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

TorbenS

Germany
12 Posts

Posted - 03/30/2023 :  02:44:04 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating Hello

I use a python script for plotting a contour plot from XYZ data with a user defined template. After plotting I need to go into the details and search the min & max level. Then I need to adjust the colormap again. Here, I use lite blue for negative value up to zero and lite red for 0 up to positive values.
Thus, I get a colorcode: Blue = negativ, white = zero, red = positive.

Since everything else is automated by the python script I wonder if I could script this too. Unfortunately I was not able to find Python commands for this operation. Is there a LabTalk function which can do it?

Thanks in advance and kind regards!
Torben

Origin Ver. and Service Release (Select Help-->About Origin): 2022b (64 bit)
Operating System: Windows 10System:

ChaoC

USA
178 Posts

Posted - 03/30/2023 :  3:52:04 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Torben,

Set the Fill settings to 3-Color Limited Mixing and save it to your Template.
When you use your Python script to plot using the template, it should automatically scale to your Min(blue) and Max(red) with 0 as White.



Example:


Best,
Chao
Go to Top of Page

TorbenS

Germany
12 Posts

Posted - 04/03/2023 :  10:30:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Chao,

sorry for my late reply.
Your solution worked perfectly for me. Thank you!

Best,
Torben

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