フィルターのクリア

Linestyle of matrix with plotyy

1 回表示 (過去 30 日間)
Thomas Johansson
Thomas Johansson 2016 年 2 月 1 日
回答済み: dpb 2016 年 2 月 1 日
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

回答 (1 件)

dpb
dpb 2016 年 2 月 1 日
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.

カテゴリ

Help Center および File ExchangeTwo y-axis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by