How to zoom a region of a plot?
    5 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    aneps
      
 el 1 de Abr. de 2014
  
I have a program which plots 6 different data as separate plots. I want to get those plots zoomed in a range. For example, my original data X value range from 0 to 5e5. I want only data from 0 to 0.2e5 appear on my plot, I mean zoomed in this region. How can I modify my script to do this?
My program:
 A=load('31March2014e_run1.asc');
 B=load('31March2014e_run2.asc');
 C=load('31March2014e_run3.asc');
 D=cat(1,A,B,C);
 x=D(:,1);
 n=6.5:1000:2e6;
 y=hist(x,n);
 semilogy(n,y,'-ob')
I tried by giving
 samplerange=0:0.2e5
then modifying
 semilogy(n(samplerange),y,'-ob')
But it doesnt work!
0 comentarios
Respuesta aceptada
  Azzi Abdelmalek
      
      
 el 1 de Abr. de 2014
        
      Editada: Azzi Abdelmalek
      
      
 el 1 de Abr. de 2014
  
       ylim([0 0.2e5])
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Data Exploration 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!