Skip to content

Commit

Permalink
Add default output format config to example
Browse files Browse the repository at this point in the history
  • Loading branch information
mmore500 committed Dec 29, 2023
1 parent 33aea2f commit 444647d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,14 @@ Example 3
^^^^^^^^^

Example with matplotlib, also showing use of ``teeplot_callback`` kwarg .
We've also used the global configuration option ``save'' to change default output format.
.. code-block:: python
# adapted from https://matplotlib.org/stable/tutorials/pyplot.html
from matplotlib import pyplot as plt
import numpy as np; from teeplot import teeplot as tp
tp.save = {".eps": True} # make default output only .eps
data = {'a': np.arange(50), 'c': np.random.randint(0, 50, 50),
'd': np.random.randn(50)}
Expand All @@ -166,8 +168,7 @@ Example with matplotlib, also showing use of ``teeplot_callback`` kwarg .
.. code-block:: python
teeplots/c=c+s=d+viz=scatter+x=a+y=b+ext=.pdf
teeplots/c=c+s=d+viz=scatter+x=a+y=b+ext=.png
teeplots/c=c+s=d+viz=scatter+x=a+y=b+ext=.eps
.. image:: docs/assets/c=c+s=d+viz=scatter+x=a+y=b+ext=_padded.png
Expand Down

0 comments on commit 444647d

Please sign in to comment.