Skip to content

Commit

Permalink
feat: control which axes are turned on/off
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Apr 2, 2020
1 parent 94a4e97 commit baf03e7
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions ipyvolume/pylab.py
Original file line number Diff line number Diff line change
Expand Up @@ -1263,14 +1263,21 @@ def translate(mplstyle):
fig.style = totalstyle

@staticmethod
def axes_off():
"""Do not draw the axes."""
style.use({'axes': {'visible': False}})
def _axes(which=None, **values):
if which:
style.use({'axes': {name: values for name in which}})
else:
style.use({'axes': values})

@staticmethod
def axes_off(which=None):
"""Do not draw the axes, optionally give axis names, e.g. 'xy'."""
style._axes(which, visible=False)

@staticmethod
def axes_on():
"""Draw the axes."""
style.use({'axes': {'visible': True}})
def axes_on(which=None):
"""Draw the axes, optionally give axis names, e.g. 'xy'."""
style._axes(which, visible=True)

@staticmethod
def box_off():
Expand Down

0 comments on commit baf03e7

Please sign in to comment.