Skip to content

Commit

Permalink
Update README with new color cycles
Browse files Browse the repository at this point in the history
  • Loading branch information
John Garrett committed Sep 8, 2020
1 parent 8074213 commit d6189ad
Show file tree
Hide file tree
Showing 18 changed files with 44 additions and 11 deletions.
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,31 +88,42 @@ You can also combine these styles with the other styles that come with Matplotli

**Note:** See the ``examples/`` directory for more!

Color Cycles
------------

The ``high-vis`` color cycle:

<img src="https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig4.jpg" width="500">
Color-blind Safe Color Cycles
-----------------------------

The ``bright`` color cycle:
The ``bright`` color cycle (7 colors):

<img src="https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig6.jpg" width="500">

The ``vibrant`` color cycle:
The ``vibrant`` color cycle (7 colors):

<img src="https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig7.jpg" width="500">

The ``muted`` color cycle:
The ``muted`` color cycle (10 colors):

<img src="https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig8.jpg" width="500">

The ``high-contrast`` color cycle (3 colors):

<img src="https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig12.jpg" width="500">

The ``light`` color cycle (9 colors):

<img src="https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig13.jpg" width="500">

**Note:** These color cycles are from [Paul Tol's website](https://personal.sron.nl/~pault/).

Other Color Cycles
------------------

The ``high-vis`` color cycle:

<img src="https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig4.jpg" width="500">

The ``retro`` color cycle:

<img src="https://github.com/garrettj403/SciencePlots/raw/master/examples/figures/fig9.jpg" width="500">

**Note:** The ``bright``, ``vibrant`` and ``muted`` color cycles are from [Paul Tol's website](https://personal.sron.nl/~pault/). **They are color-blind safe!**

Help and Contributing
---------------------

Expand Down
Binary file modified examples/figures/fig1.pdf
Binary file not shown.
Binary file modified examples/figures/fig10.pdf
Binary file not shown.
Binary file modified examples/figures/fig11.pdf
Binary file not shown.
Binary file added examples/figures/fig12.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/figures/fig12.pdf
Binary file not shown.
Binary file added examples/figures/fig13.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/figures/fig13.pdf
Binary file not shown.
Binary file modified examples/figures/fig2.pdf
Binary file not shown.
Binary file modified examples/figures/fig3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/figures/fig3.pdf
Binary file not shown.
Binary file modified examples/figures/fig4.pdf
Binary file not shown.
Binary file modified examples/figures/fig5.pdf
Binary file not shown.
Binary file modified examples/figures/fig6.pdf
Binary file not shown.
Binary file modified examples/figures/fig7.pdf
Binary file not shown.
Binary file modified examples/figures/fig8.pdf
Binary file not shown.
Binary file modified examples/figures/fig9.pdf
Binary file not shown.
22 changes: 22 additions & 0 deletions examples/plot-examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,25 @@ def model(x, p):
ax.autoscale(tight=True)
fig.savefig('figures/fig11.pdf')
fig.savefig('figures/fig11.jpg', dpi=300)

with plt.style.context(['science', 'high-contrast']):
fig, ax = plt.subplots()
for p in [10, 20, 50]:
ax.plot(x, model(x, p), label=p)
ax.legend(title='Order')
ax.set(xlabel='Voltage (mV)')
ax.set(ylabel='Current ($\mu$A)')
ax.autoscale(tight=True)
fig.savefig('figures/fig12.pdf')
fig.savefig('figures/fig12.jpg', dpi=300)

with plt.style.context(['science', 'light']):
fig, ax = plt.subplots()
for p in [5, 7, 10, 15, 20, 30, 38, 50, 100]:
ax.plot(x, model(x, p), label=p)
ax.legend(title='Order', fontsize=7)
ax.set(xlabel='Voltage (mV)')
ax.set(ylabel='Current ($\mu$A)')
ax.autoscale(tight=True)
fig.savefig('figures/fig13.pdf')
fig.savefig('figures/fig13.jpg', dpi=300)

0 comments on commit d6189ad

Please sign in to comment.