Inversely proportional secondary axis as a reference of primary axis
Afficher commentaires plus anciens
Hello everyone;
first time here, I will appreciate any feedback and help that I can get. I am plotting in the freq. domain, but I want add a second axis in wavelength, which is (wavelength=3e8/freq), inversely proportional. The code below is my attempt to add the second axis, I am only getting the limits right but the values in between do not correspond to each other. Thank you for your time
[AX,H1,H2] = plotyy(x1,y1,x1,y2);
ax1 = gca;
delta = 0.1;
set(ax1, 'Position', get(ax1, 'Position') + [0 delta 0 -delta ]);
ax2=axes('Position', get(ax1, 'Position').* [1 1 1 0.001]-[0 delat 0 0],'Color','none');
domain=get(ax1, 'XLim')
domain=fliplr(domain).^-1
set(ax2,'xdir','reverse','Xlim',domain);
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Labels and Annotations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
