Error in loglog plot
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Balakrishnan
el 1 de Feb. de 2022
Comentada: quintan
el 22 de Sept. de 2024
I used the following code to fill the circles with suitable color in loglogplot. I am trying to plot multiple data st on a single loglog plot. But I got error marked in italic
loglog(x1,y1,'-bo','MarkerFaceColor',[0 0.4470 0.7410],'MarkerEdgeColor',[0 0.4470 0.7410],x2,y2,'-ro','MarkerFaceColor',[0.8500 0.3250 0.0980],'MarkerEdgeColor',[0.8500 0.3250 0.0980]);
Error during execution
Error using loglog
Invalid data argument.
Please advise on plotting solid circles on loglog plot
0 comentarios
Respuesta aceptada
Star Strider
el 1 de Feb. de 2022
I have no idea what the original problem was, however breaking it out into two different plot statements (that I originally did to see if that would help isolate the error) solved it.
x1 = 1:10;
y1 = rand(1,10);
x2 = 11:20;
y2 = rand(1,10);
figure
loglog(x1,y1,'-bo','MarkerFaceColor',[0 0.4470 0.7410],'MarkerEdgeColor',[0 0.4470 0.7410])
hold on
loglog(x2,y2,'-ro','MarkerFaceColor',[0.8500 0.3250 0.0980],'MarkerEdgeColor',[0.8500 0.3250 0.0980])
hold off
grid
The second loglog call can also simply be plot, with the same arguments.
.
1 comentario
Más respuestas (0)
Ver también
Categorías
Más información sobre Log 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!