How change the shape of plot ?
98 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
salim saeed
el 17 de Dic. de 2024 a las 15:25
Comentada: dpb
el 20 de Dic. de 2024 a las 16:40
i have code for ploting data but the graph is not what i am looking for is like that
but i am looking for something like that which have 2D and countor graph and 3D togheter or 2D alone but detected all 3D structure with motion value
any one have any ideal i will upload the code and file for plotting
data = load('ST1.txt');
core = reshape(data(:, 3),100,100).';
subplot(3,1,1)
surf(real(core),'edgecolor', 'none')
subplot(3,1,2)
surf(imag(core),'edgecolor', 'none')
subplot(3,1,3)
surf(abs(core),'edgecolor', 'none')
3 comentarios
dpb
el 18 de Dic. de 2024 a las 18:59
I do not know what "change shape of graph" means. Change what shape from what to what?
You can design the graph to be whatever you wish but we can't read your mind in that regard. Again, change which specific graph design from what to what?
Respuestas (1)
dpb
el 18 de Dic. de 2024 a las 17:41
Editada: dpb
el 18 de Dic. de 2024 a las 19:25
[X,Y,Z] = peaks(25);
surfc(X,Y,Z)
hold on
hAx(1)=gca;
pos=hAx(1).Position;
wh=diff(reshape(pos,2,[]).'); w=wh(1); h=wh(2);
l=pos(1); b=pos(2);
T=0.95; R=0.75;
hAx(2)=axes('Position',[l+T*w b+T*h (1-R)*w (1-R)*h],'Color','none');
hL=plot(hAx(2),X(ceil(25/2),:),Z(ceil(25/2),:),'k-','linewidth',2);
What is what you've done and what is what you're trying to do is hard to distinguish in the Question, but if the object is to get something approaching the Figure with the inset plot, the basic idea is above by placing a second axes on the same figure.
I'm not sure how the example there apparently has the edit tool icons visible...
7 comentarios
dpb
hace alrededor de 1 hora
Those have been rotated and limits applied so that the axis of the minimum is approximately straight on in view for the two to the left; the RH one for some reason was left rotated somewhat less, but sill some. Yours, however, are all still at the default viewpoint; you can either programmatically locate the minimum of the trough with time, t, in order to know that angle. Or, probably simpler would be to just use the edit tool to rotate the image until you can find the orientation from which to view it that looks as you want and then use that set of camera positions programmatically as starting point.
However, the annotation on the lower traces certainly is confusing; it says they're for a given epsilon and x=0.1 -- but if x were to be held constant in the upper 3D view, the resulting trace with time would be a constant. Those traces are, by the labelling of the axes in the 3D plots, at a specific time versus x, not at a fixed x against time.
Good luck...
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!