How can I plot a polar scatter graph with colour filled points, with the intensity of the colours relating to the values which they represent?

11 visualizaciones (últimos 30 días)
I've been trying to make a polar scatter graph showing velocities at various points in a wind tunnel, yet I require the points which are plotted to be filled with a colour, representing the intensity of that velocity. I've managed to succeed in making the plot, and it is almost correct - all of the points are plotted, and they are filled with colour - yet the actual colours they are filled with are not representative of what they should be.
for example, in the sample data provided my highest value is 7.1m/s, recorded at the highest point on the positive y axis. My lowest value is 5.7m/s, recorded at the highest point on the postive x axis. All other points on the graph range between these values. As can be seen from the attached image (the plot which is created), despite being able to see which are the highest and lowest values, these colours do not match their representative value on the colour bar (approximately 0.8 and 0.5, should be 7.1 and 5.7 respectively).
In addition to this, all of the other points are a very similar shade - almost impossible to distinguish each other apart. Although the data which i've provided shows that these values are all different. I understand that this is a small resolution, so perhaps the data needs to be scaled?
I thank anybody in advance who have any advice to offer.
I have included my test data as a .txt file.
clear all
clc
Vdata = load('testdata.txt'); %Load the data file
Angle = Vdata(:,1); %Angle of test point, taken from Real-Pos axis; deg
Velocity = Vdata(:,2); %Instantaneous velocity at test point; m/s
Radius = Vdata(:,3); %Distance from centre of wind tunnel to test point; mm
NoCol = ceil(max(Velocity)); %Number of Colors
CM = colormap(autumn(NoCol)); %Colour map
figure(1) %Create new figure
polarscatter(Angle*pi/180, Radius, 100, CM(fix(Velocity),:), 'o', 'filled') %Create polar-scatter plot
grid on
colorbar
Kind regards,
Ryan
Plot.PNG

Respuestas (0)

Categorías

Más información sobre Scatter Plots en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by