필터 지우기
필터 지우기

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 CenterFile Exchange에서 Two y-axis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by