Is it possible to visualize all data in a multiple scatterplot?

Hi,
I am trying to make a scatterplot with a lots of data via this code:
h1 = scatter(table{:,variable},table{:,'PET'}, '+','MarkerEdgeColor',[102/255, 178/255, 255/255]);
hold on
h2 = scatter(table{:,variable},table{:,'SET_'}, '+','MarkerEdgeColor',[102/255, 255/255, 102/255]);
h3 = scatter(table{:,variable},table{:,'UTCI'}, '+','MarkerEdgeColor',[255/255, 204/255, 153/255]);
h4 = scatter(table{:,variable},table{:,'PT'}, '+','MarkerEdgeColor',[255/255, 102/255, 102/255]);
h5 = scatter(table{:,variable},table{:,'mPET'}, '+','MarkerEdgeColor',[204/255, 153/255, 255/255]);
and the result is this:
It is obvious that the last plotted violet data will be above the others hiding the other colors. Is it possible to visualize all data to the same extend? For example it can be plotted through a rotation of all colours to achieve the desired visibility of all the data.

2 件のコメント

Walter Roberson
Walter Roberson 2020 年 5 月 25 日
You can set Alpha properties for scatter() plots.
Stepan Subik
Stepan Subik 2020 年 5 月 25 日
Hi, thank you for your suggestion. Unfortunatelly, this does not work in my case since I have too many data and the plot does not change with varying transparency.

サインインしてコメントする。

 採用された回答

Ameer Hamza
Ameer Hamza 2020 年 5 月 25 日

0 投票

Maybe use scatter3() and visualize by using a z-offset. Not sure if it helps in your case
h1 = scatter3(table{:,variable},table{:,'PET'}, 0*ones(size(table{:,'PET'})), '+','MarkerEdgeColor',[102/255, 178/255, 255/255]);
hold on
h2 = scatter3(table{:,variable},table{:,'SET_'}, 1*ones(size(table{:,'SET_'})), '+','MarkerEdgeColor',[102/255, 255/255, 102/255]);
h3 = scatter3(table{:,variable},table{:,'UTCI'}, 2*ones(size(table{:,'UTCI'})), '+','MarkerEdgeColor',[255/255, 204/255, 153/255]);
h4 = scatter3(table{:,variable},table{:,'PT'}, 3*ones(size(table{:,'PT'})), '+','MarkerEdgeColor',[255/255, 102/255, 102/255]);
h5 = scatter3(table{:,variable},table{:,'mPET'}, 4*ones(size(table{:,'mPET'})), '+','MarkerEdgeColor',[204/255, 153/255, 255/255]);

5 件のコメント

Stepan Subik
Stepan Subik 2020 年 5 月 25 日
Hi, this is a great idea. But it is than less intuitive in the meaning of a comparison of those variables. I am searching for some way to plot it not a variable after variable, but points from every variable at once going from first variable to last n-times, where n is the number of points for one variable. Does something like this exist?
Ameer Hamza
Ameer Hamza 2020 年 5 月 26 日
編集済み: Ameer Hamza 2020 年 5 月 26 日
Yes, it is possible. First you will need to create a column vectors for all the datapoints. Something like this
x = [table{:,variable}; table{:,variable}; table{:,variable}; table{:,variable}; table{:,variable}];
y = [table{:,'PET'}; table{:,'SET_'}; table{:,'UTCI'}; table{:,'PT'}; table{:,'mPET'}];
c = [0*ones(size(table{:,'PET'})); 1*ones(size(table{:,'SET_'})); 2*ones(size(table{:,'UTCI'})); 3*ones(size(table{:,'PT'})); 4*ones(size(table{:,'mPET'}))];
scatter(x, y, [], c);
you can try if this can improve the visualization quality.
Stepan Subik
Stepan Subik 2020 年 5 月 28 日
Nice, now I have some long running program, but I will try that tomorrow ;)
Stepan Subik
Stepan Subik 2020 年 5 月 29 日
Yes, it actually helped, thank you
Ameer Hamza
Ameer Hamza 2020 年 5 月 29 日
I am glad to be of help! Can you show the final figure and how it improved the visualization of all the points?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by