Matlab-imagesc/ data as root square depending to x-axis -


i plot data root square depending magnetic field. wrote script makes attached picture.

imagesc(y,x,a); set(gca,'ydir','normal'); axis([1.5 10 220 450]); c=colorbar; caxis([0.8 1.07]); ylabel(c,'relative transmission [-]', 'fontsize', 30) set(gca, 'fontsize', 30); xlabel('magnetic field [t]', 'fontsize', 30); ylabel('energy [mev]', 'fontsize', 30); print('colourmap','-dpng','-r700'); 

what want x-axis in format "magnetic field^1/2 [t^1/2]. colour curves in picture become looking linear function.

thank you.

use imagesc(y, sqrt(x), a); , change xlabel accordingly.

edit: pcolor

try instead scale pixel width:

ph = pcolor(sqrt(x),y,a); set(ph, 'edgecolor', 'none') 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -