y-axis looks very clustered ?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Dear all,
I have y-axis with time starting from 0 seconds to 14,000 seconds and I assigned it manually to get the values from an excel sheet and it plots all seconds which is a difference of 10 seconds each and it was too clustered and not able to see it properly because of too many data point in it.
is that any way to show just 15 points in that y-axis but when i zoom it should also automatically show the points where in it. I want the ytick should be assigned automatically with my points in excel sheet but should show just 10 or 15 tickmark in axis.
I assigned like :
fileName1 = 'Time.xls';
a = xlsread(fileName1);
x = a(:,:);
figure(2);
imagesc(log10(SRAM))
hold on
% changing the plots from depth to time
set(gca,'YTick',0:191.437546:262078)
set(gca,'YTickLabel',x)
% Targetting the graph to first 5 meters
axis ([0 120 0 (end/14)*10^5])
ylabel('Time (sec)')
title('Modelled-Depth to Time Image')
hold off
1 comentario
Jan
el 18 de Mzo. de 2011
Please use code formatting as described here: http://www.mathworks.com/matlabcentral/answers/help/markup
It would be easier to help you, if you clarify querries occuring in your former threads instead of starting a new one.
Respuesta aceptada
Más respuestas (2)
Jan
el 18 de Mzo. de 2011
Do not set the XTicks manually. Let Matlab do this automatically for you:
XLen = size(SRAM, 2);
imagesc(log10(SRAM), 'XData', linspace(0, 262078, XLen));
I've suggested this method in your former question already.
ADDED: If you want to change the Y-values instead, the method is equivalent:
YLen = size(SRAM, 1);
imagesc(log10(SRAM), 'YData', linspace(0, 262078, YLen));
7 comentarios
Jan
el 21 de Mzo. de 2011
@Elavarasan: You prefer an unusual method to set tickmarks. Look at any scientific publication: There are very good reasons to use equidistant or logarithmic ticks.
Implementing your personally styled tick marks would be not trivial. I would invest more time in assisting, if I see, that you invest the time to use code formatting in your posting, answer to requests for further clarifications, run the posted solutions and explain why they do not match your problem and spend the time to spell my name correctly.
Perhaps other users want to spend more energy on your problem. Good luck.
Walter Roberson
el 18 de Mzo. de 2011
See zoom and in particular the ActionPostCallback . In that callback you would examine the current zoom limits, figure out which ticks you wanted to display, and set() the YTicks and YTicksLabel appropriately.
0 comentarios
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!