How to 1. view a .lyrx file as a "heat map"? 2. Import the .lyrx file into a 2-d matrix?
5 次查看(过去 30 天)
显示 更早的评论
I have a .lyrx file, generated by GIS, where different points on the map were assigned some values that represent local temperature.
- How can I view this heat map, with different colors representing different temperatures?
- How can I create a 2-d matrix where each site contains a number that fits to a point in the map.
I wish to be able to look at the map and the matrix side by side, or eventually put them one on top of the other, and see how the matrix values match the heat map.
I am using the new Matlab R2024a.
2 个评论
prabhat kumar sharma
2024-4-10
can you share the same lyrx file for better understanding and reproduce.
回答(1 个)
Harsh Sharma
2024-11-11,4:54
Hi Erez,
The layer file (“.lyrx”) is not supported in MATLAB. As a workaround you can export the layer file to a supported format. Here’s the documentation link for the standard file formats and the functions to import those format files - https://www.mathworks.com/help/map/standard-file-formats.html?s_tid=CRUX_lftnav
Once you have your data imported you can use “scatter” plot to create a heatmap as you have multiple points in the dataset. Here is an example of a “scatter” plot with different color circles - https://www.mathworks.com/help/matlab/ref/scatter.html?searchHighlight=scatter&s_tid=srchtitle_support_results_1_scatter#:~:text=a%20numeric%20scalar.-,Vary%20Circle%20Color,-Vary%20Color%20Palette
You can use “meshgrid” function to create a 2D grid. Refer to the following documentation to understand how to do so - https://www.mathworks.com/help/matlab/ref/meshgrid.html
You can use “imagesc” function to visualize the matrix points and overlay it on the “scatter” plot. Refer to the following documentation to understand how to use “imagsc” function - https://www.mathworks.com/help/matlab/ref/imagesc.html?s_tid=doc_ta
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!