Skip to content

Commit 1601a21

Browse files
committed
Updates
1 parent 8f32ed2 commit 1601a21

26 files changed

Lines changed: 410 additions & 250 deletions

README.rst

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ An `object-oriented <https://matplotlib.org/api/api_overview.html>`__ `matplotli
1111
that provides versatile plotting utilities
1212
for making beautiful, publication-quality graphics.
1313

14+
Documentation
15+
-------------
16+
The documentation is published `here <https://lukelbd.github.io/proplot>`_.
17+
1418
Installation
1519
------------
1620

@@ -23,10 +27,6 @@ on PyPi. However, feel free to install directly from Github using:
2327

2428
The dependencies are `matplotlib <https://matplotlib.org/>`_ and `numpy <http://www.numpy.org/>`_. The optional geographic mapping features require `cartopy <https://scitools.org.uk/cartopy/docs/latest/>`_ and/or `basemap <https://matplotlib.org/basemap/index.html>`_.
2529

26-
Documentation
27-
-------------
28-
The documentation is published `here <https://lukelbd.github.io/proplot>`_.
29-
3030
Overview
3131
--------
3232

@@ -39,24 +39,32 @@ Import with
3939
Most of the features derive from the `~proplot.subplots.subplots` command, inspired
4040
by the pyplot `~matplotlib.pyplot.subplots` command.
4141

42-
The next most important utility is the `~proplot.axes.BaseAxes.format` method, available
43-
on every axes generated by `~proplot.subplots.subplots`. Use this method to fine-tune
44-
your axis properties, titles, labels, limits, and much more.
42+
The next most important utility is the `~proplot.axes.BaseAxes.format` method, available on every axes generated by `~proplot.subplots.subplots`. Use this method to fine-tune your axis properties, titles, labels, limits, and much more.
4543

4644
Here are some highlights of the rest of the features:
4745

48-
- Colors: Perceptually distinct named colors, powerful
49-
colormap-generating tools, ability to trivially swap between "color
50-
cycles" and "colormaps". A few new, beautiful colormaps and color
51-
cycles. Make colorbars from lists of lines or colors.
52-
- Geometry: A smarter "tight subplots" method. Panels and empty spaces
53-
are held *fixed*, while the figure and axes dimensions are allowed to
54-
change. This achieves a "tight border" without messing up axes aspect
55-
ratios or spaces.
56-
- Projections: Integration with basemap and cartopy. Generate arbitrary
46+
* A smarter "tight layout" feature. Figure width or height alternately
47+
scales so that subplot **aspect ratios** are fixed, inner space
48+
between subplots automatically scaled so subplot tick labels, etc. do
49+
not overlap with each other.
50+
* Easy setting customization with a user ``.proplotrc`` file. Option
51+
to save custom colormaps, and they will be loaded every time on startup.
52+
* Axes panels and figure panels, for global colorbars, global legends,
53+
or tertiary data. Panel widths always held fixed during "tight layout"
54+
scaling.
55+
* Perceptually distinct named colors with easy-to-remember names,
56+
a ton of beautiful new colormaps, new property cycle colors.
57+
* Tool for making new make new merged colormaps and "perceptually
58+
uniform colormaps" on-the-fly.
59+
* Making colorbars from lists of lines
60+
or colors, making axes "inset" colorbars.
61+
* Integration with basemap and cartopy. Generate arbitrary
5762
grids of map projections in one go. Switch between the cartopy and
58-
basemap backends painlessly. Add geographical features as part of the
59-
`~proplot.axes.CartopyAxes.format` process.
63+
basemap backends painlessly. Using the axes methods directly for basemap
64+
plotting, instead of the `~mpl_toolkits.basemap.Basemap` object.
65+
* Ability to add geographical features as part of the
66+
`~proplot.axes.CartopyAxes.format` process. Formatting geographic
67+
gridlines and labels.
6068

6169
Shout out to `bradyrx <https://github.com/bradyrx>`__ for being the
6270
guinea pig and helping me fix a lot of the initial bugs. Check out his `decadal climate prediction package <https://github.com/bradyrx/climpred>`_.
@@ -70,23 +78,30 @@ different?
7078

7179
While parts of ProPlot were inspired by seaborn (in particular much
7280
of ``colors.py`` is drawn from seaborn’s ``palettes.py``), the goal for
73-
this project was quite different – it is intended to simplify the task
81+
this project was quite different: It is intended to simplify the task
7482
of making publication-quality figures, and no more.
7583

7684
Seaborn largely attempts to merge the tasks of data analysis and
77-
visualization, and many of its features require neatly tabulated data in
78-
a standard form. ProPlot contains no analysis tools – it is expected
79-
that you analyze your data on your own time.
80-
81-
By focusing on this single task, I created a number of
82-
powerful features beyond the scope of `seaborn`. I was also able
83-
to integrate my features much more closely with the matplotlib API.
85+
visualization. ProPlot contains no analysis tools – it is expected
86+
that you analyze your data on your own time. Anyway, both `pandas`
87+
and `xarray` already have great built-in tools for visualizing
88+
tabulated and geophysical data --
89+
and if ProPlot is imported, these tools will even work with its new
90+
colormaps. I was able
91+
to integrate my features very closely with the matplotlib API (usually
92+
as enhancements of existing `~matplotlib.axes.Axes` and
93+
`~matplotlib.figure.Figure` methods),
94+
while the `seaborn` features are only accessible from commands on the module
95+
itself.
96+
97+
By focusing on this single task, I've added a number of
98+
powerful features well beyond the scope of `seaborn`.
8499

85100
Donations
86101
---------
87102

88-
This package took a shocking amount of time to write and to publish. If you've found it
89-
useful, feel free to buy me a cup of coffee :)
103+
At well over 10,000 lines of code, this package took a shocking amount of time to write and to publish... so I'll just
104+
leave this here :)
90105

91106
.. image:: https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif
92107
:target: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5SP6S8RZCYMQA&source=url

docs/index.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ProPlot
99

1010
An `object-oriented <https://matplotlib.org/api/api_overview.html>`__ `matplotlib <https://matplotlib.org/>`__ wrapper
1111
that can help you make beautiful, publication-quality graphics.
12+
This Github page is found `here <https://github.com/lukelbd/proplot>`__.
1213

1314
Installation
1415
============
@@ -51,7 +52,8 @@ and built-in geographic projections.
5152
The next most important utility is the ``format`` method on `~proplot.axes.BaseAxes`, which calls so-called ``smart_update`` methods on the `~proplot.axes.BaseAxes`, `~proplot.axes.XYAxes`, `~proplot.axes.CartopyAxes`, and `~proplot.axes.BasemapAxes` axes types. The latter three types can all be returned by `~proplot.subplots.subplots`, depending on the arguments you used. Use `~proplot.axes.BaseAxes.format` to fine-tune your axis properties, titles, labels, limits, and much more. See :ref:`Table of projections` for the projections available to cartopy and basemap.
5253

5354
To get started, check out the :ref:`Introduction`.
54-
Hopefully, you will find this API to be **less verbose** and **more powerful** than the builtin `pyplot and object-oriented <https://matplotlib.org/api/api_overview.html>`__ matplotlib APIs.
55+
Hopefully, you will find this API to be less verbose and
56+
more powerful than the builtin matplotlib API.
5557

5658
.. This is just so top-level headers in the showcase.rst
5759
file appear as *subsections* in the documentation to
@@ -63,6 +65,16 @@ Hopefully, you will find this API to be **less verbose** and **more powerful** t
6365
:show-inheritance:
6466
Use 'sphinx-apidoc ../proplot -o .' to auto-generate modules.rst
6567
68+
Donations
69+
=========
70+
71+
At well over 10,000 lines of code, this package took a shocking amount of time to write and to publish... so I'll just
72+
leave this here :)
73+
74+
.. image:: https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif
75+
:target: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5SP6S8RZCYMQA&source=url
76+
77+
6678
.. toctree::
6779
:hidden:
6880
:maxdepth: 4

docs/showcase.rst

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,19 @@ relatively non-linear in saturation.
14711471
:height: 304px
14721472

14731473

1474+
.. code:: ipython3
1475+
1476+
plot.cmap_breakdown('temp')
1477+
1478+
1479+
1480+
1481+
1482+
.. image:: showcase/showcase_94_1.png
1483+
:width: 1009px
1484+
:height: 306px
1485+
1486+
14741487
Table of colormaps
14751488
------------------
14761489

@@ -1502,9 +1515,9 @@ for usage details.
15021515
15031516
15041517
1505-
.. image:: showcase/showcase_96_1.png
1518+
.. image:: showcase/showcase_97_1.png
15061519
:width: 436px
1507-
:height: 4509px
1520+
:height: 4409px
15081521

15091522

15101523
Table of color cycles
@@ -1530,7 +1543,7 @@ See `~proplot.axes.wrapper_cycle`, `~proplot.colortools.Cycle`, and
15301543
15311544
15321545
1533-
.. image:: showcase/showcase_99_0.png
1546+
.. image:: showcase/showcase_100_0.png
15341547
:width: 540px
15351548
:height: 1615px
15361549

@@ -1573,7 +1586,7 @@ still registered, but I encourage using the below table instead.
15731586
15741587
15751588
1576-
.. image:: showcase/showcase_102_0.png
1589+
.. image:: showcase/showcase_103_0.png
15771590
:width: 720px
15781591
:height: 1316px
15791592

@@ -1586,7 +1599,7 @@ still registered, but I encourage using the below table instead.
15861599
15871600
15881601
1589-
.. image:: showcase/showcase_103_0.png
1602+
.. image:: showcase/showcase_104_0.png
15901603
:width: 630px
15911604
:height: 225px
15921605

@@ -1631,7 +1644,7 @@ import.
16311644
16321645
16331646
1634-
.. image:: showcase/showcase_106_1.png
1647+
.. image:: showcase/showcase_107_1.png
16351648
:width: 544px
16361649
:height: 334px
16371650

@@ -1672,7 +1685,7 @@ string with ``+N`` or ``-N`` to offset the channel value by the number
16721685
16731686
16741687
1675-
.. image:: showcase/showcase_108_0.png
1688+
.. image:: showcase/showcase_109_0.png
16761689
:width: 724px
16771690
:height: 345px
16781691

@@ -1699,7 +1712,7 @@ adding a number to the end of the color string.
16991712
17001713
17011714
1702-
.. image:: showcase/showcase_110_0.png
1715+
.. image:: showcase/showcase_111_0.png
17031716
:width: 634px
17041717
:height: 306px
17051718

@@ -1724,7 +1737,7 @@ colormap. Again, see `~proplot.axes.wrapper_cmap` for details.
17241737
17251738
17261739
1727-
.. image:: showcase/showcase_112_0.png
1740+
.. image:: showcase/showcase_113_0.png
17281741
:width: 733px
17291742
:height: 314px
17301743

@@ -1754,7 +1767,7 @@ details.
17541767
17551768
17561769
1757-
.. image:: showcase/showcase_114_0.png
1770+
.. image:: showcase/showcase_115_0.png
17581771
:width: 652px
17591772
:height: 424px
17601773

@@ -1784,7 +1797,7 @@ reversed diverging colormaps by their “reversed” name – for example,
17841797
17851798
17861799
1787-
.. image:: showcase/showcase_116_0.png
1800+
.. image:: showcase/showcase_117_0.png
17881801
:width: 544px
17891802
:height: 478px
17901803

@@ -1814,7 +1827,7 @@ for details.
18141827
18151828
18161829
1817-
.. image:: showcase/showcase_119_0.png
1830+
.. image:: showcase/showcase_120_0.png
18181831
:width: 517px
18191832
:height: 356px
18201833

@@ -1839,7 +1852,7 @@ for details.
18391852
18401853
18411854
1842-
.. image:: showcase/showcase_120_1.png
1855+
.. image:: showcase/showcase_121_1.png
18431856
:width: 634px
18441857
:height: 318px
18451858

@@ -1879,7 +1892,7 @@ by the `~proplot.colortools.ColorDictSpecial` class.
18791892
18801893
18811894
1882-
.. image:: showcase/showcase_123_0.png
1895+
.. image:: showcase/showcase_124_0.png
18831896
:width: 436px
18841897
:height: 603px
18851898

docs/showcase/showcase_102_0.png

-863 KB
Binary file not shown.

docs/showcase/showcase_103_0.png

711 KB
Loading

docs/showcase/showcase_104_0.png

152 KB
Loading

0 commit comments

Comments
 (0)