Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Simplfying Line Plot Command

2 visualizzazioni (ultimi 30 giorni)
Michael
Michael il 11 Mar 2014
Chiuso: MATLAB Answer Bot il 20 Ago 2021
Is there any way to accomplish this:
plot(largebinsmesh, guessCurve,'k-','linewidth',3.0);
plot(largebinsmesh, guessCurve,'w-.','linewidth',1.2);
in one line with plot?

Risposte (1)

Walter Roberson
Walter Roberson il 11 Mar 2014
No. The closest you could get would be,
h = plot(largebinsmesh, guessCurve, 'k-', largebinsmesh, guessCurve,'w-.','linewidth',1.2);
set(h(1), 'linewidth', 3.0);
This presumes that guessCurve is a vector; if it is a 2D array then it would be h(1:size(largebinmesh,2)) that would have to be set()
plot() accepts multiple string specifiers for the plotspec but it does not accept multiple parameter value pairs for the same parameter name.

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by