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: docs/faq.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Why do my inline figures look different?
33
33
34
34
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).
35
35
36
-
Matplotlib tends to generate really low-resolution, artifact-plagued jpegs -- and to keep them legible, they use a fairly large default figure width of 6.5 inches (usually only suitable for multi-panel plots) and a fairly 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.
36
+
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.
37
37
38
38
ProPlot helps you get your figure sizes *correct* for embedding
Copy file name to clipboardExpand all lines: docs/overview.rst
+30-33Lines changed: 30 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,17 @@
1
1
==============
2
-
Quick overview
2
+
Usage overview
3
3
==============
4
4
5
-
ProPlot is an object-oriented matplotlib wrapper for making beautiful, publication-quality graphics. Most of its features derive from subclasses of the `~matplotlib.figure.Figure` and `~matplotlib.axes.Axes` classes.
5
+
ProPlot is an *object-oriented* matplotlib wrapper, which means
6
+
most of its features derive from subclasses of the `~matplotlib.figure.Figure` and `~matplotlib.axes.Axes` classes. If you tend to use the `~matplotlib.pyplot` API and are not familiar with figure and axes "objects", you should first take a look at `this page <https://matplotlib.org/api/api_overview.html#the-pyplot-api>`__. Using the objects directly tends to be more clear and concise than `~matplotlib.pyplot` API, and makes life easier when working with multiple figures or axes.
6
7
7
-
This page is meant as the starting point for new users. It is
8
-
populated with links to the :ref:`API reference` and User Guide.
9
-
For more in-depth descriptions, see :ref:`Why ProPlot?`.
8
+
..
9
+
This page gives a condensed overview of these features, along with features
10
+
outside of these classes.
11
+
..
12
+
This page is meant as the starting point for new users. It is
13
+
populated with links to the :ref:`API reference` and User Guide.
14
+
For more in-depth descriptions, see :ref:`Why ProPlot?`.
10
15
11
16
Importing proplot
12
17
=================
@@ -17,36 +22,28 @@ We recommend importing ProPlot with
17
22
18
23
import proplot as plot
19
24
20
-
This differentiates ProPlot from the usual ``plt`` abbreviation used for the `~matplotlib.pyplot` module.
25
+
This differentiates ProPlot from the usual ``plt`` abbreviation used for the `~matplotlib.pyplot` module. Importing proplot immediately adds a bunch of new colormaps, property cyclers, color names, and fonts to matplotlib. See :ref:`Colormaps`, :ref:`Color cycles`, and :ref:`Colors and fonts` for details.
21
26
22
-
Importing proplot immediately adds a bunch of new colormaps, property cyclers, color names, and fonts to matplotlib and changes some default settings.
23
-
If this is all you want and you don't care about the plotting features, simply
24
-
``import proplot`` at the top of your script. See :ref:`Colormaps`, :ref:`Color cycles`, and :ref:`Colors and fonts` for details.
25
-
26
-
Top-level commands
27
-
==================
28
-
29
-
ProPlot's features derive from the `~proplot.subplots.subplots` command, inspired
30
-
by the pyplot `~matplotlib.pyplot.subplots` command.
31
-
32
-
The `~proplot.subplots.subplots` command creates a `~proplot.subplots.Figure` subclass
33
-
populated with special `~proplot.axes.Axes` subclasses,
34
-
and is packed with new features -- one highlight is the new :ref:`Figure tight layout`
35
-
algorithm applied to all `~proplot.subplots.Figure`\ s by default.
36
-
See :ref:`Creating figures` for details.
37
-
38
-
Figure and axes methods
27
+
Figure and axes classes
39
28
=======================
40
-
The new `~proplot.subplots.Figure` and `~proplot.axes.Axes` classes
41
-
override various matplotlib methods to implement tons of useful features.
29
+
ProPlot's features derive from `~proplot.subplots.subplots`, modeled after
30
+
the native `matplotlib.pyplot.subplots` command.
31
+
`~proplot.subplots.subplots` creates a `~proplot.subplots.Figure` subclass
32
+
populated with special `~proplot.axes.Axes` subclasses.
33
+
See :ref:`Creating figures`
34
+
and :ref:`Figure tight layout` for details.
42
35
43
-
The most important new method is `~proplot.axes.Axes.format`. This is available on every axes subclass generated by proplot -- `~proplot.axes.XYAxes`, `~proplot.axes.PolarAxes`, and `~proplot.axes.ProjAxes`. Use this method to fine-tune your axis properties, titles, labels, limits, arbitrary settings, and much much more.
44
-
See :ref:`Customizing figures` for details.
36
+
Each `~proplot.axes.Axes` class also belongs to
37
+
one of the `~proplot.axes.XYAxes`, `~proplot.axes.PolarAxes`,
38
+
or `~proplot.axes.ProjAxes` parent classes, depending on the projection used. See
39
+
:ref:`Geographic and polar plots` for details.
45
40
46
-
Proplot adds new `~proplot.axes.Axes` `~proplot.axes.Axes.colorbar` and `~proplot.axes.Axes.legend` commands and `~proplot.subplots.Figure` `~proplot.subplots.Figure.colorbar` and `~proplot.subplots.Figure.legend` commands that make adding colorbars and legends to the *outside* of axes simple. See :ref:`Colorbars and legends` for details.
41
+
The `~proplot.subplots.Figure` and `~proplot.axes.Axes` subclasses
42
+
include useful new methods and override several existing methods:
47
43
48
-
ProPlot also wraps several plotting methods on the `~proplot.axes.Axes` class.
49
-
See :ref:`1d plotting` and :ref:`2d plotting` for details.
44
+
* The most important new method is `~proplot.axes.Axes.format`, whose behavior depends on whether the axes is an `~proplot.axes.XYAxes`, `~proplot.axes.PolarAxes`, or `~proplot.axes.ProjAxes`. This method fine-tunes various axes settings. See :ref:`Customizing figures` for details.
45
+
* The `~proplot.subplots.Figure` `~proplot.subplots.Figure.colorbar` and `~proplot.subplots.Figure.legend` and `~proplot.axes.Axes` `~proplot.axes.Axes.colorbar` and `~proplot.axes.Axes.legend` commands are used to add colorbars and legends *inside* of subplots, along the *outside edge* of subplots, and along the *edge of the figure*. See :ref:`Colorbars and legends` for details.
46
+
* There is a huge variety of new features for working with contour plots, pcolor plots, heatmaps, line plots, error bars, bar plots, area plots, and parametric plots. See :ref:`1d plotting` and :ref:`2d plotting` for details.
50
47
51
48
Integration with other packages
52
49
===============================
@@ -55,9 +52,9 @@ ProPlot includes integration with `xarray`, `pandas`, `cartopy`, and `~mpl_toolk
55
52
* Axis labels, tick labels, titles, colorbar labels, and legend labels are automatically applied when you pass an `xarray.DataArray`, `pandas.DataFrame`, or `pandas.Series` object to any plotting command. This works just like the native `xarray.DataArray.plot` and `pandas.DataFrame.plot` methods. See :ref:`1d plotting` and :ref:`2d plotting` for details.
56
53
* The `~proplot.projs.Proj` function lets you make arbitrary grids of basemap `~mpl_toolkits.basemap.Basemap` and cartopy `~cartopy.crs.Projection` projections. It is used to interpret the `proj` keyword arg passed to `~proplot.subplots.subplots`. The resulting axes are instances of `~proplot.axes.ProjAxes` with `~proplot.axes.ProjAxes.format` methods that can be used to add geographic features and custom meridian and parallel gridlines. See :ref:`Geographic and polar plots` for details.
57
54
58
-
Additional tools
59
-
================
60
-
ProPlot includes a bunch of additional tools outside
55
+
Other functions and classes
56
+
===========================
57
+
ProPlot includes a bunch of useful tools outside
61
58
of the `~proplot.subplots.Figure` and `~proplot.axes.Axes` subclasses:
62
59
63
60
* The `~proplot.styletools.Colormap` and `~proplot.styletools.Cycle` constructor functions. These can slice, merge, and modify colormaps and color cycles. See :ref:`Colormaps`, :ref:`Color cycles`, and :ref:`Colors and fonts` for details.
0 commit comments