bi-directional heat plot

3 次查看(过去 30 天)
Gavin Seddon
Gavin Seddon 2022-6-20
回答: Brahmadev 2023-9-29
Hello
I have a directional feather plot (.mat attached). This gives large data tab (.txt not loadable).
Will someone please tell me how to place the two columns of data ajacent on a heat fit for comparison?
The values may need to be loged because of their quantity.
GS

回答(1 个)

Brahmadev
Brahmadev 2023-9-29
Hi Gavin,
From my understanding, you would like to plot the data in the columns of 'bothX.txt' using a heatmap. You might be facing an issue due to the heatmap grid as the size of the data is large. You can use the code below for turning the grid off and create a more legible heatmap:
fileID = fopen('bothX.txt','r'); % Open the .txt file
formatSpec = '%f';
sizeA = [2 Inf];
DataPoints = fscanf(fileID, formatSpec, sizeA); % Read the data from the file
fclose(fileID); % Close the file
DataPoints = DataPoints'; % Reformating the data according to match our original data
h = heatmap(DataPoints); % Plot the heatmap
h.GridVisible = 'off'; % Turn the Grid Off
h.YDisplayLabels = nan(size(h.YDisplayData)); % Remove the Y axes' Display Labels
Hope this helps resolve your issue!

类别

Help CenterFile Exchange 中查找有关 Data Distribution Plots 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by