How could i displace the values of X axis under X axis (Y negative) ?

3 vues (au cours des 30 derniers jours)
mattvanviore
mattvanviore le 13 Fév 2019
Modifié(e) : Yair Altman le 16 Fév 2019
+

Réponse acceptée

Star Strider
Star Strider le 13 Fév 2019
Use the equation (or values) for the line, and plot the numbers just as you have plotted them under the circles. If you do not have an equation for the line that gives you the values for it at every ‘x’ value, use the interp1 function to calculate them.
  4 commentaires
mattvanviore
mattvanviore le 15 Fév 2019
this is my script for the plot
plot(ALFAinv,CMacinv,'ok','LineWidth',1)
grid on
xlabel('\alpha [°]')
ylabel('C_M_a_c','Rotation',0)
set(gca,'fontsize',11)
ax=gca;
ax.XAxisLocation='origin';
ax.YAxisLocation='origin';
set(gca,'Ydir','reverse')
ax.YAxis.TickDirectionMode='manual';
ax.YAxis.TickDirection='in';
axis([-6 19 -0.8 0.8])
hold on
plot(ALFAxf,CMacxf,'--b','LineWidth',1)
plot(ALFAxl,CMacxl,'-k','LineWidth',1)
title('POLO X=0.265 Y=0 63A412 Re=3e6','LineWidth',1)
legend ('XFOIL non viscoso','XFOIL ascissa forzata','XFOIL ascissa libera')
hold off
Star Strider
Star Strider le 15 Fév 2019
I don‘t have your data, so I can’t run your script.
I also have no idea what you want to do.
I gave you valid code. If it doesn’t work for you, I need to know the reason. Your posted code — especially without necessary data — gives me no useful information.

Connectez-vous pour commenter.

Plus de réponses (1)

Yair Altman
Yair Altman le 16 Fév 2019
Modifié(e) : Yair Altman le 16 Fév 2019
A peculiarity of AxisLocation='origin' is that the X and Y tick labels automatically switch location (from below the X axis to above-it, and from left of the Y axis to right-of-it, respectively) depending on where the axes origin (0,0) is located. You can easily see this behavior by dragging (panning) the axes up/down and left/right, respectively.
If you want to ensure that the labels appear beneath the X axes, then make the YLimit above the axes larger than the one beneath it. For example:
ax.YLim = [-.80001,.8];
axis([-6 19 -0.80001 0.8]); % alternative
  2 commentaires
Star Strider
Star Strider le 16 Fév 2019
@Yair — Thank you yet again!
+1
Yair Altman
Yair Altman le 16 Fév 2019
My pleasure - see you again soon :-)

Connectez-vous pour commenter.

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by