Borrar filtros
Borrar filtros

Plot cuts off left-most point

2 visualizaciones (últimos 30 días)
David
David el 9 de Jul. de 2015
Respondida: Star Strider el 9 de Jul. de 2015
E.g., the first section below shows the left-most data point, but when the second plot is added to this figure (using the second section) it gets cut off. How can I prevent this?
N=[10 100 1000 10000 100000];
lengths=[5e-2 1.6e-2 5e-3 1.6e-3 5e-4];
n=logspace(1,5);
rate=1./sqrt(n);
loglog(N,lengths,'x','LineWidth',2,'Color','k')
hold all;
loglog(n,rate,'LineWidth',1,'LineStyle','--','Color','k');
First section:
Both sections:

Respuestas (1)

Star Strider
Star Strider el 9 de Jul. de 2015
In R2015a, using hold on (and hold off) instead of hold all, the plot displays correctly:
N=[10 100 1000 10000 100000];
lengths=[5e-2 1.6e-2 5e-3 1.6e-3 5e-4];
n=logspace(1,5);
rate=1./sqrt(n);
loglog(N,lengths,'x','LineWidth',2,'Color','k')
hold on
loglog(n,rate,'LineWidth',1,'LineStyle','--','Color','k');
hold off

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by