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
 All Forums
 Origin Forum for Programming
 Forum for Python
 Creating a heatmap using External python

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
cts18488 Posted - 11/16/2021 : 12:14:36 PM
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
4   L A T E S T    R E P L I E S    (Newest First)
lelotte_b Posted - 11/13/2023 : 07:03:16 AM
Found:
https://www.originlab.com/doc/en/LabTalk/ref/Plot-Type-IDs
lelotte_b Posted - 11/13/2023 : 06:47:59 AM
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
cpyang Posted - 11/17/2021 : 12:25:19 PM
Heatmap is 105.

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

CP
cts18488 Posted - 11/17/2021 : 07:22:14 AM
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


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000