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
 Creating a heatmap using External python
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cts18488

United Kingdom
82 Posts

Posted - 11/16/2021 :  12:14:36 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I am using the following code to try to create a heatmap using External python:

arr_x = np.array([[1, 2], [3, 4]])
wks = op.new_sheet(type='m')
wks.from_np(arr_x)
gr = op.new_graph(template=op.path('e') + 'test_2map.otpu') # test_2map.otpu is a template with 4 heatmaps
gl_1 = gr[0]
p1 = gl_1.add_mplot(wks, 0, 1, 2, type = 103)
gl_1.rescale()

Instead of obtaining a heatmap, I am obtaining only a straight line.
Do I need to change the type? If yes, what would be the code?

Thank you for your help,
Tibi

Origin Ver. 2021b and Service Release SR2 (Select Help-->About Origin):
Operating System: Win10 Ent

cts18488

United Kingdom
82 Posts

Posted - 11/17/2021 :  07:22:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I have noticed if you change the type to 105, 106 or 107 it will create a heatmap.

quote:
Originally posted by cts18488

I am using the following code to try to create a heatmap using External python:

arr_x = np.array([[1, 2], [3, 4]])
wks = op.new_sheet(type='m')
wks.from_np(arr_x)
gr = op.new_graph(template=op.path('e') + 'test_2map.otpu') # test_2map.otpu is a template with 4 heatmaps
gl_1 = gr[0]
p1 = gl_1.add_mplot(wks, 0, 1, 2, type = 103)
gl_1.rescale()

Instead of obtaining a heatmap, I am obtaining only a straight line.
Do I need to change the type? If yes, what would be the code?

Thank you for your help,
Tibi

Origin Ver. 2021b and Service Release SR2 (Select Help-->About Origin):
Operating System: Win10 Ent

Go to Top of Page

cpyang

USA
1406 Posts

Posted - 11/17/2021 :  12:25:19 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Heatmap is 105.

103 is 3D surface, which will work only if using a 3D template.

CP
Go to Top of Page

lelotte_b

Switzerland
2 Posts

Posted - 11/13/2023 :  06:47:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
where can I get the list of the plot type?
I would like to plot an image and I only found 103 (3D surface) and 243 (contour) in the documentation.
Best,
Barthélémy
Go to Top of Page

lelotte_b

Switzerland
2 Posts

Posted - 11/13/2023 :  07:03:16 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Found:
https://www.originlab.com/doc/en/LabTalk/ref/Plot-Type-IDs
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