What is the best way to show that 2 points a linked together
4 次查看(过去 30 天)
显示 更早的评论
So Im doing windtunnel testing on a model of an ultra van. Currently I have to plot the out line of the van and where the tube holes(read circles) are on the out line. I also have to plot the cp of each point where the tube is(blue). If you look at the file in the bottom you can see what the graph looks like and you can see at the end there are holes that over lap each other in the x postion. This cause the cp graph to overlap with itself a bit. Is there a good way to show which points are which on the cp graph.
0 个评论
回答(1 个)
Divyajyoti Nayak
2024-10-11
I see that you want to show the points on your Cp graph more clearly since the points at the end have very close x values. It would be better to show the Cp values in a 3d plot using the plot3 function.
I extracted the data from the given figure and used the plot3 function to get a 3d line which I think looks clearer.
clear
clc
fig = openfig('w55mph.fig');
axObjs = fig.Children(2)
dataObjs = findobj(fig,'-property','Ydata')
tube_X = dataObjs(2).XData;
tube_Y = dataObjs(2).YData;
tube_Z = zeros(size(tube_X));
cp_X = tube_X;
cp_Y = tube_Y;
cp_Z = dataObjs(1).YData;
figure;
plot3(tube_X,tube_Y,tube_Z, 'o', 'MarkerSize',5, 'LineStyle','-','MarkerEdgeColor','red','Color','green');
hold on
plot3(cp_X, cp_Y, cp_Z,'-*','Color','blue');
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!