In Python/Seaborn, there is the option to offset the x and y axis at the origin. This 'despine' pulls the x-axis down a bit, and the y-axis left, so that data that are close to either one become more visible. For example:
I can use Matlab for (almost) all figure aesthetics issues, but this seems to be only possible in Illustrator. I've searched the file exchange but haven't found any submission that does this... Does anyone have an idea of how to easily move the axes outwards while keeping the data the same?
Thanks!

댓글 수: 3

dpb
dpb 2015년 7월 30일
"Easily", no, not really...it's just not an option TMW has implemented.
In Matlab you'll have to draw the two axes lines via the primitives to get the break as in the example; even if you were to add an offset to the data and tick values to move the line relative to the actual axes (and then write the tick label values) the axes would intersect where they meet.
dpb
dpb 2015년 7월 30일
ADDENDUM Seems like a reasonable enhancement request; after all only 25+ yr after I requested for hold on to not recycle the color order counter by default they actually did!!!
dpb
dpb 2015년 7월 30일
ADDENDUM 2 Probably the easiest thing to do with Matlab is to change the lower x/y limit to something slight less than 2/1 to thus have the actual data start slightly above/right of the axes. The tick values can still be the unit values. Again, of course, they'll still meet at the intersection.

댓글을 달려면 로그인하십시오.

답변 (1개)

Anne Urai
Anne Urai 2015년 7월 31일

1 개 추천

I guessed as much. I've written a workaround for this, http://nl.mathworks.com/matlabcentral/fileexchange/52351-offsetaxes-ax--pt-

댓글 수: 1

dpb
dpb 2015년 7월 31일
Nice idea to draw over the axis base line segment to make it disappear; hadn't thought of that additional nicety...

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Line Plots에 대해 자세히 알아보기

질문:

2015년 7월 30일

댓글:

dpb
2015년 7월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by