New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch single axis ruler visibility #928
base: develop
Are you sure you want to change the base?
Conversation
…s <xyz> line=none' if the visibility of the <xyz>-axis ruler is set to 'off'. Signed-off-by: Jan Taro Svejda <jan.svejda@uni-due.de>
@JTSvejda Thanks for this PR. I took the liberty to edit your post to add the example, as it wasn't completely clear that we wanted to toggle single axis. As a side note, this might be a good opportunity to encapsulate axis visibility into a function, with the overall visibility, checked a bit earlier in the code, also part of this function. Moreover, we would need to test for Octave vs Matlab, as I do not think that the former has this option. |
@okomarov I would second that. |
@@ -922,6 +922,14 @@ case guitypes() | |||
m2t = drawBoxAndLineLocationsOfAxes(m2t, handle); | |||
m2t = drawGridOfAxes(m2t, handle); | |||
m2t = drawLegendOptionsOfAxes(m2t); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be moved above to the following clause
if ~isVisible(handle)
and an elseif. I would prefer if hide axis is not accompanied with 'axis xyz line = 0'
I hope this is the solution to your comment... |
m2t.axes{end}.name = 'axis'; | ||
|
||
m2t = drawBackgroundOfAxes(m2t, handle); | ||
m2t = drawTitleOfAxes(m2t, handle); | ||
m2t = drawBoxAndLineLocationsOfAxes(m2t, handle); | ||
m2t = drawGridOfAxes(m2t, handle); | ||
m2t = drawLegendOptionsOfAxes(m2t); | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That spurios newline should go away
So does this also account for axis ticks and ticklabels? |
I've tested it with the attached example and the ticks and ticklabels are non-visible if the axis ruler is non-visible. |
This should go at the beginning of function |
Added a loop to the drawAxes() function to add the axis property 'axis line=none' if the visibility of the -axis specific ruler is set to 'off', e.g.
Best Regards
JTSvejda