Incorrect autoscaling during plot command in matlab
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello guys, first time poster. I just had a question about my code- I am just trying to plot some data that I imported from a csv file, but the plot itself leaves voids.
I haven't done anything to change the settings.
The code:
clear all; close all; clc
t = load('sampledata.csv');
time=t(1:125000,1);
gage=t(1:125000,2);
plot(time,gage)
xlabel('Sample Number')
ylabel('volts')
title('{\bf Oscilloscope Data}')
any help or advice will be appreciated. thanks!
sam
![](https://www.mathworks.com/matlabcentral/images/broken_image.png)
5 comentarios
Walter Roberson
el 2 de Oct. de 2011
To embed an image, use a separate paragraph and start it with << followed immediately (no space after << ) by the URL to the image directly, followed immediately (no space after URL) by >>
The tricky part is often in finding the direct URL for the image, especially if you do not have an account on the system being used to host the image. For situations like that, I display the image in my browser, position my cursor over it, right-click, and choose "Copy image location". That URL is then the one I paste in to the posting.
Respuestas (2)
Bjorn Gustavsson
el 26 de Sept. de 2011
That figure looks OK to me I guess. "Guess" since I dont know what your data going in was...
What points are you missing?
Do you want a tighter fit of the plot around the points? Then you should could do:
axis tight
Beside that not much to go on here.
HTH
4 comentarios
Samuel
el 30 de Sept. de 2011
2 comentarios
Walter Roberson
el 30 de Sept. de 2011
set(gca, 'Xlim', [min(time),max(time)], 'YLim', [min(gage),max(gage)])
Ver también
Categorías
Más información sobre Annotations 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!