plotting of 2D surfaces
1 view (last 30 days)
Show older comments
For the same size variable (33 * 1), I have found two distinct values. To compare the differences in a single plot, I'd want to plot these values as surface plots or some other creative way. For the same, I only plotted bar comparisons.
The variables are:
X= [1 0.9932 0.9735 0.97 0.9702 0.9479 0.915 0.913 0.9002 0.8877 0.8893 0.8927 0.8819 0.8672 0.8668 0.872 0.8435 0.8295 0.9914 0.9773 0.9745 0.9721 0.9596 0.9296 0.9172 0.9525 0.9595 0.9788 0.9949 1.0048 1.0568 1.0934 1.0731 ];
Y = [ 1.018 0.9933 0.9847 0.9879 0.9948 1.002 1.0004 1.0012 1.0138 1.026 1.0518 1.0318 1.0207 1.0049 1.0046 1.0102 0.9796 0.9644 0.9931 0.9789 0.9762 0.9737 0.9707 0.9405 0.9281 1.0067 1.014 1.0339 1.0505 1.0607 1.114 1.1516 1.1308 ];
0 Comments
Answers (1)
John D'Errico
on 17 Dec 2022
Edited: John D'Errico
on 17 Dec 2022
Totally CONFUSING.
X= [1 0.9932 0.9735 0.97 0.9702 0.9479 0.915 0.913 0.9002 0.8877 0.8893 0.8927 0.8819 0.8672 0.8668 0.872 0.8435 0.8295 0.9914 0.9773 0.9745 0.9721 0.9596 0.9296 0.9172 0.9525 0.9595 0.9788 0.9949 1.0048 1.0568 1.0934 1.0731 ];
Y = [ 1.018 0.9933 0.9847 0.9879 0.9948 1.002 1.0004 1.0012 1.0138 1.026 1.0518 1.0318 1.0207 1.0049 1.0046 1.0102 0.9796 0.9644 0.9931 0.9789 0.9762 0.9737 0.9707 0.9405 0.9281 1.0067 1.014 1.0339 1.0505 1.0607 1.114 1.1516 1.1308 ];
plot(X,Y,'o')
Are you telling us that X and Y should be essentially replicates at each position, but they are clearly not, and now you want to see how they are different? What does a surface plot have to do with this? You have not even provided us with the third variable anyway. Ok, so the plot of X versus Y seems to offer little information content. Try this instead.
plot(X-Y,'o')
Perhaps the difference plot about is what you want to see. It shows the difference at each location in the vector. So zero tells you that both vectors werre the same at that point. Below zero tell you that Y was the larger of the two. Above zero tells you that X was the larger.
Or, perhaps what you want to see is something like this:
plot(1:numel(X),[X;Y],'-r')
Where at each position in the vector, we see the two curves plotted. In blue I show the average of the two curves.
plot([1;1]*(1:numel(X)),[X;Y],'-ro',1:numel(X),(X+Y)/2,'b--')
In hat last one, I've plotted the two variables, showing the difference between each with a vertical line.
Or perhaps you want to see a bar plot.
bar(1:numel(X),[X;Y])
But honestly, I have no idea what you are asking. The idea of a surface plot makes no real sense at all that I can see.
See Also
Categories
Find more on Scatter Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!