Filter löschen
Filter löschen

Linestyle of matrix with plotyy

1 Ansicht (letzte 30 Tage)
Thomas Johansson
Thomas Johansson am 1 Feb. 2016
Beantwortet: dpb am 1 Feb. 2016
Hi, I am plotting two matrix with plotyy and want to change the linestyle of all the lines belonging to the first matrix. [hx,hL1,hL2]=plotyy(x,Y1,x,Y2) The problem is that the linestyle handle is the size of the lines in the matrix and I do not want to loop through them all. hL1.LineStyle = '--' does not work, gives
Expected one output from a curly brace or dot indexing expression, but there were 10 results.
I hope someone can help me.
BR thomas

Antworten (1)

dpb
dpb am 1 Feb. 2016
Use set for multiple handles...
set(hL1,'linestyle',':')
Don't know why TMW didn't add the facility in the methods; if going to trouble to write them one would think they'd be useful for the real world cases, not just the simple ones.
doc set % for details
Drill down for the arcane cases of multiple handles w/ differing values, etc., etc., etc., ... You can do almost anything desired via cell arrays as arguments.

Kategorien

Mehr zu Two y-axis finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by