I'm trying to plot a 2D (x,y), z response on a scatter plot. I had it working, but then wanted to change the size of the markers since they're a little small. I entered a few commands and nothing seemed to work because I got errors in the command window. Then all of a sudden my scatterplot was gone and replaced by a blank blue screen. No axes. Nothing. If i'm not in the range of my data, I get a white blank graph with x and y axes. I tried zooming out to see if perhaps I set my marker size to something huge...also no luck.
I have tried entering set(gcf, 'Renderer', 'painters') and set(gcf, 'Renderer', 'opengl') into the command window. Nothing changed.
I suspect I accidentally set something on my computer because I have two different versions of matlab on my laptop (student) and both are having this error.
T is an imported 258 x 5 excel file containing data points. This is my base code. I am using MATLAB R2020a and reran in R2020b to see if I had the same issue. Thanks.
xlabel('X Coordinate (mm)')
ylabel ('Y Coordinate (mm)')
title ('Dynamic Pressure along Axial ODU SST Tunnel Walls')
Pictures: All are after one run of my code.
- What pops up when I run my code.
2. I am able to click on a data point, but can't see it or others.
3. Outside out my data range limit I can see a blank plot with axes.
For anyone else with the same issue, I updated my code to:
pointsize = 2;
scatter(T.X, T.Y, pointsize, T.Dynamic_Pressure);
which has solved all of my issues. Benjamin's answer was correct. My plot was interpreting the third input as size. I now have a 2D plot with 3 vectors and a color gradient for the 3rd vector.