Skip to content

Commit

Permalink
EXA
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbrodbeck committed Apr 29, 2021
1 parent 63ea5f3 commit 12d15f9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/plots/customizing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# extension: .py
# format_name: sphinx
# format_version: '1.1'
# jupytext_version: 1.5.0
# jupytext_version: 1.10.2
# kernelspec:
# display_name: Python 3
# language: python
Expand Down Expand Up @@ -66,14 +66,18 @@
###############################################################################
# Modifying components
# ^^^^^^^^^^^^^^^^^^^^
# Matplotlib can be used to fully customize a plot's appearance by accessing
# the underlying :cls:`matplotlib.figure.Figure` object through the plot's
# :attr:`.figure` aatribute.

p = plot.Boxplot('fltvar', 'A % B', match='rm', ds=ds, w=2)

p = plot.Boxplot('fltvar', 'A % B', match='rm', ds=ds, w=2, xlabel=False)
p = plot.Boxplot('fltvar', 'A % B', match='rm', ds=ds, w=2, h=3, xlabel=False)
ax = p.figure.axes[0]
ax.set_xticklabels(['A long label', 'An even longer label', 'Another label', 'And yet another one'], rotation=45, ha='right')
ax.grid(axis='y')
ax.set_yticks([-2, 0, 2])
ax.tick_params('y', left=False)
for spine in ax.spines.values():
spine.set_visible(False)
p.figure.tight_layout()

0 comments on commit 12d15f9

Please sign in to comment.