What is the best way to show that 2 points a linked together

5 visualizaciones (últimos 30 días)
Joshua Nagle Nagle
Joshua Nagle Nagle el 27 de Nov. de 2018
Respondida: Divyajyoti Nayak el 11 de Oct. de 2024
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.

Respuestas (1)

Divyajyoti Nayak
Divyajyoti Nayak el 11 de Oct. de 2024
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');

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by