changing y limit of a plot
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
LUI PAUL
el 4 de Abr. de 2015
Comentada: Image Analyst
el 5 de Abr. de 2015
i have x column matrix...the plotting is shown...how to change y axis limit between 0 to 1 not changing x values? please help....
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/148679/image.png)
0 comentarios
Respuesta aceptada
Image Analyst
el 5 de Abr. de 2015
Use the ylim() function to set the limits of the y axis:
y = y / max(y); % Normalize y
bar(x, y);
ylim([0, 1]);
7 comentarios
Image Analyst
el 5 de Abr. de 2015
You're welcome. Go ahead and officially "Accept this answer" then. Thanks in advance.
Más respuestas (1)
dpb
el 4 de Abr. de 2015
I presume you mean to normalize the values as simply changing the y-axis limits on the plot would just leave a solid blob across the whole graph...how, precisely, to compute that is dependent upon how you have the data that made the plot which you haven't revealed...
1 comentario
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!