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
 Origin Forum
 Heatmap for nonequaly spaced X-Values
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Scotty3007

Germany
4 Posts

Posted - 09/29/2023 :  08:17:52 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello Together,

i have a rather specific problem:
I have a set of measurement-Data in XYZ-Format that i want to plot as a Heatmap. The Y-Axis is equaly spaced. The X-Axis-Values, however, are not, as they were also measured individually together with the corresponding Z-Value.
Converting now to a matrix for heatmap plotting via gridding is not sufficient for me as it falsifies the result.
Is there a way how i can plot the Heatmap, while for each Y-Value Row a different X-Spacing is used? Especially Contour smoothing must not be enabled.

For clarity, here is a minimal example of the data arrangement:

X Y Z
----------------------------------
-1 1 10
0 1 11
1 1 12
-0.9 0 11
0.1 0 11
0.9 0 10
-1.1 -1 9
0 -1 12
1.1 -1 13

I was able to successfully plot it the way i need it in Matlab via a loop
for i=(each row of Y)
imagesc(X(i,:), Y(i), Z(i,:))
end
so basically many stacked heatmap plots in one figure

Hope i could clarify the issue and that someone can help me :)

Best Regards,
Scotty3007

YimingChen

1613 Posts

Posted - 09/29/2023 :  09:13:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Could you attach a picture showing the graph generated by the MatLab code? Thank you.

James
Go to Top of Page

Scotty3007

Germany
4 Posts

Posted - 09/29/2023 :  09:30:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply


Here is what Matlab produces
Go to Top of Page

YimingChen

1613 Posts

Posted - 09/29/2023 :  2:44:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can make such heatmap in Origin. But you need to make separate heatmp for each y, then merge them together. Please find the attached project file.

https://my.originlab.com/ftp/forum_and_kbase/Images/specialHeatMap.opju

James
Go to Top of Page

Scotty3007

Germany
4 Posts

Posted - 10/03/2023 :  05:19:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I see, thank you already for your help.
Is there maybe also a way to accelerate this? Many measurements have to be evaluated this way and the Y-Axis consist of over hundred values...
Go to Top of Page

YimingChen

1613 Posts

Posted - 10/04/2023 :  4:33:56 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It could be done in the upcoming Origin 2024 using the X-function to Plot multiple sheets into one heatmap. Please watch the attached video for the steps.
https://my.originlab.com/ftp/forum_and_kbase/Images/BatchPeakDeconvolution1.zip

James
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