I'd like to create a heat map to analyze the porosity of some specimens that I have 3D-printed. the X-Y coordinates are fixed since they are the positions in which the specimens are printed on the platform.
Heatmap:
Tbl = readtable('Data/heatmap/above.csv');
X = Tbl(:,1);
Y = Tbl(:,2);
porosity = Tbl(:,3);
hmap_above = heatmap(Tbl, 'X', 'Y', 'ColorVariable', 'porosity');
The first question is: how can I sort the Y-axis of the plot? since it goes from the lower value (top) to the higher value (bottom) and I need it the other way around.
The second question is: I only have around 22 data points and most of the chart is without color, so I'd like to get a smoother heatmap without the black parts.
The data set is quite simple and is shown below:
X | Y | porosity |
---|---|---|
74.4615 | 118.3773 | 0.039172163 |
84.8570 | 69.4699 | 0.046314637 |
95.2526 | 20.5625 | 0.041855213 |
105.6482 | -28.3449 | 0.049796110 |
116.0438 | -77.2522 | 0.045010692 |
25.5541 | 107.9817 | 0.038562053 |
35.9497 | 59.0743 | 0.041553065 |
46.3453 | 10.1669 | 0.036152061 |
56.7408 | -38.7404 | 0.060719664 |
67.1364 | -87.6478 | 0.037756115 |
-23.3533 | 97.5861 | 0.052840845 |
-12.9577 | 48.6787 | 0.045216851 |
-2.5621 | -0.2286 | 0.033645353 |
7.8335 | -49.1360 | 0.030670865 |
18.2290 | -98.0434 | 0.024952472 |
-72.2607 | 87.1905 | 0.036199237 |
-61.8651 | 38.2831 | 0.026725885 |
-51.4695 | -10.6242 | 0.029212058 |
-41.0739 | -59.5316 | 0.028572611 |
-30.6783 | -108.4390 | 0.036796151 |
-121.1681 | 76.7949 | 0.031688096 |
-110.7725 | 27.8876 | 0.034619855 |
-100.3769 | -21.0198 | 0.039070101 |
-89.9813 | -69.9272 | NaN |
-79.5857 | -118.8346 | NaN |