MATLAB: Can you help me to change this plot to nano meter scale ! i want x multiply by 10^-6 mathplot syms x; x=1:10 v(x)=1./(1+2*(x.^2)) semilogy(x, v(x)) Best Answer If you simply want to label the x-axis, without changing anything else, try this:t = linspace(0, 2*pi);s = sin(t);figureplot(t, s)gridxt = get(gca, 'XTick'); % Current Tick Valuesset(gca, 'XTick',xt, 'XTickLabel',xt*1E-6) % Current Tick Values With New Tick Labels Related SolutionsMATLAB: I have a 2D graph both x and y axis; however the x and y are in inches and i want to convert them into centimeter Use the get and set functions to adjust the tick labels:xt = get(gca, 'XTick');set(gca, 'XTick', xt, 'XTickLabel',xt*2.54)yt = get(gca, 'YTick');set(gca, 'YTick', yt, 'YTickLabel',yt*2.54)NOTE: I tested this on another plot. It works. MATLAB: How to change vaules on X axis on a plot Try this:x = 0:1300; % Create Datay = -2.1*x; % Create Datafigure(1)plot(x, y)xt = get(gca, 'XTick');set(gca, 'XTick',xt, 'XTickLabel',xt/10) Related QuestionManipulating X-Axis ValuesSwitching scales on x axisChange the scale of a horizontal bar graphHow to add the values to the top of the barsDefining the limits for discrete time sequence on x axis using stem command
Best Answer