Plotting data with large jumps in scale
Mostrar comentarios más antiguos
Question about how to plot something. Say you have a data set, there's a bunch of data clustered between [1,3] then you have a huge jump and more data clustered at [68 70]. How do you plot so that the scale between 3 and 68 is small compared to the rest of the graph.
if true
% And here is my code.
figure
hold on
L1=line( t(i:dF(3,1)), cumulativeDevelopment(1,i:dF(3,1)));
L2=line( t(dF(3,1):dF(3,2)), cumulativeDevelopment(2,dF(3,1):dF(3,2)));
L3=line( t(dF(3,2):dF(3,3)), cumulativeDevelopment(3,dF(3,2):dF(3,3)));
L4=line( t(dF(3,3):dF(3,4)), cumulativeDevelopment(4,dF(3,3):dF(3,4)));
hold off
set(L1 , ...
'LineStyle' , '-' , ...
'Marker' , 'none' , ...
'Color' , [1 0 0] );
set(L2 , ...
'LineStyle' , '--' , ...
'Marker' , 'none' , ...
'Color' , [0.5 0 0.6] );
set(L3 , ...
'LineStyle' , '-.' , ...
'Marker' , 'none' , ...
'Color' , [0 0 1] );
set(L4 , ...
'LineStyle' , '-' , ...
'Marker' , 'none' , ...
'Color' , [0 1 0] );
end
Respuestas (1)
Image Analyst
el 24 de Feb. de 2013
0 votos
I don't have your data or the function cumulativeDevelopment() so I can't run your code. I'm not sure what you're doing with line(). Why not use semilogy() to plot?
2 comentarios
Garrett Culos
el 24 de Feb. de 2013
Image Analyst
el 24 de Feb. de 2013
I still can't run your code but it's good that you got something that works (I think) for you.
Categorías
Más información sobre Graphics Performance en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!