You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: INSTALL.rst
+12-3
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
Installation
2
2
============
3
3
4
-
ProPlot is published on `PyPi <https://pypi.org/project/proplot/>`__ and `conda-forge <https://conda-forge.org>`__. It can be installed with ``pip`` or ``conda`` as follows:
4
+
ProPlot is published on `PyPi <https://pypi.org/project/proplot/>`__
5
+
and `conda-forge <https://conda-forge.org>`__. It can be installed
6
+
with ``pip`` or ``conda`` as follows:
5
7
6
8
.. code-block:: bash
7
9
@@ -16,6 +18,13 @@ Likewise, an existing installation of ProPlot can be upgraded to the latest vers
16
18
conda upgrade proplot
17
19
18
20
19
-
To install a development version of ProPlot, you can use ``pip install git+https://github.com/lukelbd/proplot.git`` or clone the repository and run ``pip install -e .`` inside the ``proplot`` folder.
21
+
To install a development version of ProPlot, you can use
or clone the repository and run ``pip install -e .`` inside
24
+
the ``proplot`` folder.
20
25
21
-
ProPlot's only hard dependency is `matplotlib <https://matplotlib.org/>`__. The *soft* dependencies are `cartopy <https://scitools.org.uk/cartopy/docs/latest/>`__, `basemap <https://matplotlib.org/basemap/index.html>`__, `xarray <http://xarray.pydata.org>`__, and `pandas <https://pandas.pydata.org>`__. See the documentation for details.
26
+
ProPlot's only hard dependency is `matplotlib <https://matplotlib.org/>`__.
27
+
The *soft* dependencies are `cartopy <https://scitools.org.uk/cartopy/docs/latest/>`__,
Copy file name to clipboardexpand all lines: README.rst
+6-2
Original file line number
Diff line number
Diff line change
@@ -18,14 +18,18 @@ ProPlot is published on `PyPi <https://pypi.org/project/proplot/>`__ and
18
18
pip install proplot
19
19
conda install -c conda-forge proplot
20
20
21
-
Likewise, an existing installation of ProPlot can be upgraded to the latest version with:
21
+
Likewise, an existing installation of ProPlot can be upgraded
22
+
to the latest version with:
22
23
23
24
.. code-block:: bash
24
25
25
26
pip install --upgrade proplot
26
27
conda upgrade proplot
27
28
28
-
To install a development version of ProPlot, you can use ``pip install git+https://github.com/lukelbd/proplot.git`` or clone the repository and run ``pip install -e .`` inside the ``proplot`` folder.
29
+
To install a development version of ProPlot, you can use
Copy file name to clipboardexpand all lines: docs/faq.rst
+89-33
Original file line number
Diff line number
Diff line change
@@ -5,51 +5,107 @@ Frequently asked questions
5
5
What makes this matplotlib wrapper different?
6
6
=============================================
7
7
8
-
There is already a great matplotlib wrapper called `seaborn <https://seaborn.pydata.org/>`__. Also, `pandas <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.html>`__ and `xarray <http://xarray.pydata.org/en/stable/plotting.html>`__ both offer convenient matplotlib plotting commands. How does ProPlot compare against these tools?
9
-
10
-
* ProPlot, seaborn, pandas, and xarray all offer tools for generating rigid, simple, nice-looking plots from data stored in `~pandas.DataFrame`\ s and `~xarray.DataArray`\ s (ProPlot tries to apply labels from these objects, just like pandas and xarray).
11
-
* Unlike seaborn, pandas, and xarray, ProPlot *also* works for arbitrarily complex subplot grids, and ProPlot provides tools for heavily customizing plots.
12
-
* ProPlot is integrated with *cartopy* and *basemap*. You will find plotting geophysical data in ProPlot to be much more concise than working with cartopy and basemap directly.
13
-
* ProPlot *expands upon* the seaborn tools for working with color and global settings. For example, see `~proplot.constructor.Colormap`, `~proplot.colors.PerceptuallyUniformColormap`, and `~proplot.config.RcConfigurator`.
14
-
* ProPlot *expands upon* matplotlib by fixing various quirks, developing a more sophisticated automatic layout algorithm, simplifying the process of drawing outer colorbars and legends, and much more.
15
-
* ProPlot is *built right into the matplotlib API*, thanks to special subclasses of the `~matplotlib.figure.Figure` and `~matplotlib.axes.Axes` classes, while seaborn, pandas, and xarray are meant to be used separately from the matplotlib API.
16
-
17
-
In a nutshell, ProPlot is intended to *unify the convenience of seaborn, pandas, and xarray plotting with the power and customizability of the underlying matplotlib API*.
8
+
There is already a great matplotlib wrapper called
and `xarray <http://xarray.pydata.org/en/stable/plotting.html>`__
12
+
both offer convenient matplotlib plotting commands.
13
+
How does ProPlot compare against these tools?
14
+
15
+
* ProPlot, seaborn, pandas, and xarray all offer tools for generating rigid, simple,
16
+
nice-looking plots from data stored in `~pandas.DataFrame`\ s and
17
+
`~xarray.DataArray`\ s (ProPlot tries to apply labels from these objects, just like
18
+
pandas and xarray).
19
+
* Unlike seaborn, pandas, and xarray, ProPlot *also* works for arbitrarily complex
20
+
subplot grids, and ProPlot provides tools for heavily customizing plots.
21
+
* ProPlot is integrated with *cartopy* and *basemap*. You will find plotting geophysical
22
+
data in ProPlot to be much more concise than working with cartopy and basemap
23
+
directly.
24
+
* ProPlot *expands upon* the seaborn tools for working with color and global settings.
25
+
For example, see `~proplot.constructor.Colormap`,
26
+
`~proplot.colors.PerceptuallyUniformColormap`, and `~proplot.config.RcConfigurator`.
27
+
* ProPlot *expands upon* matplotlib by fixing various quirks, developing a more
28
+
sophisticated automatic layout algorithm, simplifying the process of drawing outer
29
+
colorbars and legends, and much more.
30
+
* ProPlot is *built right into the matplotlib API*, thanks to special subclasses of the
31
+
`~matplotlib.figure.Figure` and `~matplotlib.axes.Axes` classes, while seaborn,
32
+
pandas, and xarray are meant to be used separately from the matplotlib API.
33
+
34
+
In a nutshell, ProPlot is intended to *unify the convenience of seaborn, pandas, and
35
+
xarray plotting with the power and customizability of the underlying matplotlib API*.
18
36
19
37
..
20
38
So while ProPlot includes similar tools, the scope and goals are largely different.
21
-
Indeed, parts of ProPlot were inspired by these projects -- in particular, ``setup.py`` and ``colortools.py`` are modeled after seaborn. However the goals and scope of ProPlot are largely different:
39
+
Indeed, parts of ProPlot were inspired by these projects -- in particular,
40
+
``setup.py`` and ``colortools.py`` are modeled after seaborn. However the goals and
41
+
scope of ProPlot are largely different:
22
42
23
43
Why didn't you add to matplotlib directly?
24
44
==========================================
25
45
26
-
Since ProPlot is built right into the matplotlib API, you might be wondering why we didn't contribute to the matplotlib project directly.
27
-
28
-
* Certain features directly conflict with matplotlib. For example, ProPlot's tight layout algorithm conflicts with matplotlib's `tight layout <https://matplotlib.org/tutorials/intermediate/tight_layout_guide.html>`__ by permitting *fluid figure dimensions*, and the new `~proplot.gridspec.GridSpec` class permits *variable spacing* between rows and columns and uses *physical units* rather than figure-relative and axes-relative units.
29
-
* Certain features are arguably too redundant. For example, `~proplot.axes.Axes.format` is convenient, but the same tasks can be accomplished with existing axes and axis "setter" methods. Also, some of the functionality of `~proplot.ui.subplots` can be replicated with `axes_grid1 <https://matplotlib.org/mpl_toolkits/axes_grid1/index.html>`__. Following `TOOWTDI <https://wiki.python.org/moin/TOOWTDI>`__ philosophy, these features should probably not be integrated.
46
+
Since ProPlot is built right into the matplotlib API, you might be wondering why we
47
+
didn't contribute to the matplotlib project directly.
48
+
49
+
* Certain features directly conflict with matplotlib. For example, ProPlot's tight
50
+
layout algorithm conflicts with matplotlib's `tight layout\
51
+
<https://matplotlib.org/tutorials/intermediate/tight_layout_guide.html>`__ by
52
+
permitting *fluid figure dimensions*, and the new `~proplot.gridspec.GridSpec` class
53
+
permits *variable spacing* between rows and columns and uses *physical units* rather
54
+
than figure-relative and axes-relative units.
55
+
* Certain features are arguably too redundant. For example, `~proplot.axes.Axes.format`
56
+
is convenient, but the same tasks can be accomplished with existing axes and axis
57
+
"setter" methods. Also, some of the functionality of `~proplot.ui.subplots` can be
58
+
replicated with `axes_grid1\
59
+
<https://matplotlib.org/mpl_toolkits/axes_grid1/index.html>`__. Following `TOOWTDI
60
+
<https://wiki.python.org/moin/TOOWTDI>`__ philosophy, these features should probably
61
+
not be integrated.
30
62
31
63
..
32
-
* ProPlot design choices are made with the academic scientist working with ipython notebooks in mind, while matplotlib has a much more diverse base of hundreds of thousands of users. Matplotlib developers have to focus on support and API consistency, while ProPlot can make more dramatic improvements.
64
+
* ProPlot design choices are made with the academic scientist working with ipython
65
+
notebooks in mind, while matplotlib has a much more diverse base of hundreds of
66
+
thousands of users. Matplotlib developers have to focus on support and API
67
+
consistency, while ProPlot can make more dramatic improvements.
33
68
34
-
Nevertheless, if any core matplotlib developers think that some of ProPlot's features should be added to matplotlib, please contact `Luke Davis <https://github.com/lukelbd>`__ and let him know!
69
+
Nevertheless, if any core matplotlib developers think that some of ProPlot's features
70
+
should be added to matplotlib, please contact
71
+
`Luke Davis <https://github.com/lukelbd>`__ and let him know!
35
72
36
73
Why do my inline figures look different?
37
74
========================================
38
75
39
-
These days, most publications prefer plots saved as `vector graphics <https://en.wikipedia.org/wiki/Vector_graphics>`__ [1]_ rather than `raster graphics <https://en.wikipedia.org/wiki/Raster_graphics>`__ [2]_. When you save vector graphics, the content sizes should be appropriate for embedding the plot in a document (for example, if an academic journal recommends 8-point font for plots, you should use 8-point font in your plotting code).
40
-
41
-
Most of the default matplotlib backends make low-quality, artifact-plagued jpegs. To keep them legible, matplotlib uses a fairly large default figure width of 6.5 inches (usually only suitable for multi-panel plots) and a slightly large default font size of 10 points (where most journals recommend 5-9 points). This means your figures have to be downscaled so the sizes used in your plotting code are *not* the sizes that appear in the document.
76
+
These days, most publications prefer plots saved as
rather than `raster graphics <https://en.wikipedia.org/wiki/Raster_graphics>`__ [2]_.
79
+
When you save vector graphics, the content sizes should be appropriate for embedding the
80
+
plot in a document (for example, if an academic journal recommends 8-point font for
81
+
plots, you should use 8-point font in your plotting code).
82
+
83
+
Most of the default matplotlib backends make low-quality, artifact-plagued jpegs. To
84
+
keep them legible, matplotlib uses a fairly large default figure width of 6.5 inches
85
+
(usually only suitable for multi-panel plots) and a slightly large default font size of
86
+
10 points (where most journals recommend 5-9 points). This means your figures have to be
87
+
downscaled so the sizes used in your plotting code are *not* the sizes that appear in
88
+
the document.
89
+
90
+
ProPlot helps you get your figure sizes *correct* for embedding them as vector graphics
91
+
inside publications. It uses a slightly smaller default font size, calculates the
92
+
default figure size from the number of subplot rows and columns, and adds the `journal`
93
+
keyword argument to `~proplot.figure.Figure` which can be used to employ figure
94
+
dimensions from a particular journal standard. To keep the inline figures legible,
95
+
ProPlot also employs a *higher quality* default inline backend.
96
+
97
+
.. [1] `Vector graphics <https://en.wikipedia.org/wiki/Vector_graphics>`__ use physical
98
+
units (e.g. inches, `points <https://en.wikipedia.org/wiki/Point_(typography)>`__),
99
+
are infinitely scalable, and often have much smaller file sizes than bitmap graphics.
100
+
You should consider using them even when your plots are not destined for publication.
101
+
PDF, SVG, and EPS are the most common formats.
102
+
103
+
.. [2] `Raster graphics <https://en.wikipedia.org/wiki/Raster_graphics>`__ use pixels
104
+
and are *not* infinitely scalable. They tend to be faster to display and easier
105
+
to view, but they are discouraged by most academic publishers. PNG and JPG are the
106
+
most common formats.
42
107
43
-
ProPlot helps you get your figure sizes *correct* for embedding
44
-
them as vector graphics inside publications.
45
-
It uses a slightly smaller default font size, calculates the default figure
46
-
size from the number of subplot rows and columns, and
47
-
adds the `journal` keyword argument to `~proplot.figure.Figure` which can
48
-
be used to employ figure dimensions from a particular journal standard.
49
-
To keep the inline figures legible, ProPlot also employs a *higher quality* default
50
-
inline backend.
51
-
52
-
.. [1] `Vector graphics <https://en.wikipedia.org/wiki/Vector_graphics>`__ use physical units (e.g. inches, `points <https://en.wikipedia.org/wiki/Point_(typography)>`__), are infinitely scalable, and often have much smaller file sizes than bitmap graphics. You should consider using them even when your plots are not destined for publication. PDF, SVG, and EPS are the most common formats.
53
-
.. [2] `Raster graphics <https://en.wikipedia.org/wiki/Raster_graphics>`__ use pixels and are *not* infinitely scalable. They tend to be faster to display and easier to view, but they are discouraged by most academic publishers. PNG and JPG are the most common formats.
54
-
55
-
.. users to enlarge their figure dimensions and font sizes so that content inside of the inline figure is visible -- but when saving the figures for publication, it generally has to be shrunk back down!
108
+
..
109
+
users to enlarge their figure dimensions and font sizes so that content inside of the
110
+
inline figure is visible -- but when saving the figures for publication, it generally
0 commit comments