Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca72203

Browse files
committed
Merge branch 'master' into wrapper-docs-on-methods
2 parents fb9ba07 + c2e7584 commit ca72203

File tree

106 files changed

+629
-901
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+629
-901
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
.vimsession
44
.*.sw[a-z]
55

6+
# Ignore auto-generated files
7+
proplotrc
8+
69
# PyPi stuff
710
build
811
dist

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ python:
1212
- "3.6"
1313

1414
before_install:
15+
- |
16+
MODIFIED_FILES=$(git diff --name-only "$TRAVIS_COMMIT_RANGE" 2>/dev/null)
17+
if [ $? -eq 0 ]; then
18+
if ! echo "$MODIFIED_FILES" | grep -qvE '(.md)|(.rst)|(.yml)|(.html)'
19+
then
20+
echo "Only doc files were updated, not running the CI."
21+
exit
22+
fi
23+
fi
1524
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
1625
- bash miniconda.sh -b -p $HOME/miniconda
1726
- export PATH="$HOME/miniconda/bin:$PATH"

CHANGELOG.rst

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,56 @@ ProPlot v0.5.0 (2020-##-##)
3838
stacks rather than getting inserted directly into
3939
the main `~proplot.subplots.GridSpec` (:pr:`50`).
4040

41+
ProPlot v0.4.2 (2020-01-09)
42+
===========================
43+
.. rubric:: Features
44+
45+
- Add ``family`` keyword arg to `~proplot.styletools.show_fonts` (:pr:`106`).
46+
- Package the `TeX Gyre <http://www.gust.org.pl/projects/e-foundry/tex-gyre>`__
47+
font series with ProPlot (:pr:`106`). Remove a couple other fonts.
48+
- Put the TeX Gyre fonts at the head of the serif, sans-serif, monospace,
49+
cursive, and fantasy ``rcParams`` font family lists (:issue:`104`, :pr:`106`).
50+
51+
.. rubric:: Bug fixes
52+
53+
- Fix issues with Fira Math weights unrecognized by matplotlib (:pr:`106`).
54+
55+
ProPlot v0.4.1 (2020-01-08)
56+
===========================
57+
.. rubric:: Deprecation
58+
59+
- Change the default ``.proplotrc`` format from YAML to the ``.matplotlibrc``
60+
syntax (:pr:`101`).
61+
62+
.. rubric:: Features
63+
64+
- Comments (lines starting with ``#``) are now permitted in all RGB and HEX style
65+
colormap and cycle files (:pr:`100`).
66+
- Break down `~proplot.styletools.show_cycles` bars into categories, just
67+
like `~proplot.styletools.show_cmaps` (:pr:`100`).
68+
69+
.. rubric:: Bug fixes
70+
71+
- Fix issue where `~proplot.styletools.show_cmaps` and `~proplot.styletools.show_cycles`
72+
draw empty axes (:pr:`100`).
73+
- Add back the :ref:`default .proplorc file <The .proplotrc file>` to docs (:pr:`101`).
74+
To do this, ``conf.py`` auto-generates a file in ``_static``.
75+
76+
.. rubric:: Internals
77+
78+
- Add ``geogrid.color/linewidth/etc`` and ``gridminor.color/linewidth/etc`` props
79+
as *children* of ``grid.color/linewidth/etc`` (:pr:`101`).
80+
- Various `~proplot.rctools.rc_configurator` improvements, remove outdated
81+
global variables (:pr:`101`).
82+
- Better error handling when loading colormap/cycle files, and calls to
83+
`~proplot.styletools.Colormap` and `~proplot.styletools.Cycle` now raise errors while
84+
calls to `~proplot.styletools.register_cmaps` and `~proplot.styletools.register_cycles`
85+
still issue warnings (:pr:`100`).
86+
4187
ProPlot v0.4.0 (2020-01-07)
4288
===========================
4389
.. rubric:: Deprecated
4490

45-
4691
- Rename `basemap_defaults` to `~proplot.projs.basemap_kwargs` and `cartopy_projs`
4792
to `~proplot.projs.cartopy_names` (:commit:`431a06ce`).
4893
- Remove ``subplots.innerspace``, ``subplots.titlespace``,

docs/.proplotrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
small: 9
66
large: 10
77
inlinefmt: svg
8-
matplotlib: 'auto'
8+
matplotlib: auto

docs/colormaps.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"raw_mimetype": "text/restructuredtext"
1414
},
1515
"source": [
16-
"**Colormaps** are palettes constructed by sampling some *continuous function* between two end colors. Colormaps are generally used to encode data values on a pseudo-third dimension. They are are implemented with the `~proplot.styletools.LinearSegmentedColormap` and `~proplot.styletools.PerceptuallyUniformColormap` classes, which are subclassed from `~matplotlib.colors.LinearSegmentedColormap` in matplotlib (see :ref:`Making new colormaps`).\n",
16+
"ProPlot defines **colormaps** as color palettes that sample some *continuous function* between two end colors. Colormaps are generally used to encode data values on a pseudo-third dimension. They are are implemented with the `~proplot.styletools.LinearSegmentedColormap` and `~proplot.styletools.PerceptuallyUniformColormap` classes, which are subclassed from `~matplotlib.colors.LinearSegmentedColormap` in matplotlib (see :ref:`Making new colormaps`).\n",
1717
"\n",
1818
"ProPlot adds several features to help you use colormaps effectively in your figures. This section documents the new registered colormaps, explains how to make and modify colormaps, and shows how to apply them to your plots."
1919
]

docs/colors_fonts.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@
130130
"raw_mimetype": "text/restructuredtext"
131131
},
132132
"source": [
133-
"ProPlot adds several open source sans-serif fonts and introduces a `~proplot.styletools.show_fonts` command to display the available sans-serif fonts on your system (see `~matplotlib.font_manager`). Generally speaking, simple, clean sans-serif fonts are more appropriate for figures than serif fonts.\n",
133+
"ProPlot adds several open source fonts, including the `TeX Gyre <http://www.gust.org.pl/projects/e-foundry/tex-gyre>`__ font series, and introduces a `~proplot.styletools.show_fonts` command to compare fonts. By default, this command displays the *sans-serif* fonts packaged with ProPlot and available on your system (see `~matplotlib.font_manager`). Generally speaking, sans-serif fonts are more appropriate for figures than serif fonts.\n",
134134
"\n",
135-
"ProPlot also changes the default font to the Helvetica-lookalike TeX Gyre Heros. Matplotlib uses DejaVu Sans by default because DejaVu Sans is open source, can be *included* in the matplotlib distribution, and includes glyphs for a wider range of mathematical characters (where you see the \"¤\" dummy symbol in the below table, that character is unavailable). However Helvetica and Arial are much more mature and (in this developer's humble opinion) aesthetically pleasing. Thus, while ProPlot prioritizes aesthetics, you may need to switch to a font with more math characters like DejaVu Sans or Fira Math."
135+
"ProPlot also changes the default font to the Helvetica-lookalike `TeX Gyre Heros <http://www.gust.org.pl/projects/e-foundry/tex-gyre/heros/index_html>`__. Matplotlib uses `DejaVu Sans <https://dejavu-fonts.github.io>`__ in part because it includes glyphs for a wider range of mathematical symbols (where you see the “¤” dummy symbol in the below table, that character is unavailable), but IMHO TeX Gyre Heros is much more aesthetically pleasing. If your plot has lots of symbols, you may want to switch to DejaVu Sans or `Fira Math <https://github.com/firamath/firamath>`__ (which is also packaged with ProPlot)."
136136
]
137137
},
138138
{

docs/conf.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313

1414
import os
1515
import sys
16-
import matplotlib # load matplotlibrc and set up docstring settings # noqa
17-
from pygments.formatters import HtmlFormatter
18-
from pygments.styles import get_all_styles
1916

20-
# Sphinx-automodapi requires proplot on path
17+
# Add proplot to path for sphinx-automodapi
2118
sys.path.insert(0, os.path.abspath('..'))
2219

2320
# Add docs folder to PATH for local 'sphinxext' extensions
@@ -185,6 +182,8 @@
185182
# Create local pygments copies
186183
# Previously used: https://github.com/richleland/pygments-css
187184
# But do not want to depend on some random repository
185+
from pygments.formatters import HtmlFormatter # noqa: E402
186+
from pygments.styles import get_all_styles # noqa: E402
188187
path = os.path.join('_static', 'pygments')
189188
if not os.path.isdir(path):
190189
os.mkdir(path)
@@ -195,6 +194,10 @@
195194
with open(path, 'w') as f:
196195
f.write(HtmlFormatter(style=style).get_style_defs('.highlight'))
197196

197+
# Create sample .proplotrc file
198+
from proplot.rctools import _write_defaults # noqa: E402
199+
_write_defaults(os.path.join('_static', 'proplotrc'), comment=False)
200+
198201
# Role
199202
# default family is py, but can also set default role so don't need
200203
# :func:`name`, :module:`name`, etc.

docs/configuration.rst

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ Overview
77
A special object named `~proplot.rctools.rc`, belonging to the
88
`~proplot.rctools.rc_configurator` class, is created on import.
99
This is your one-stop shop for changing global settings belonging to any of
10-
the following three categories.
10+
the following three categories:
1111

1212
1. Builtin matplotlib `rcParams <https://matplotlib.org/users/customizing.html>`__
1313
settings. These have the format ``x.y`` or ``x.y.z``.
1414
2. ProPlot :ref:`rcParamsLong` settings. These also have the format ``x.y``
1515
(see below).
1616
3. ProPlot :ref:`rcParamsShort` settings. These have no dots (see below).
1717

18-
You can change settings with the `~proplot.rctools.rc` object as follows.
18+
You can change settings with the `~proplot.rctools.rc` object as follows:
1919

2020
* ``plot.rc.name = value``
2121
* ``plot.rc['name'] = value``
2222
* ``plot.rc.update(name1=value1, name2=value2)``
2323
* ``plot.rc.update({'name1':value1, 'name2':value2})``
2424

2525
To temporarily change settings on a particular axes, use either of the
26-
following.
26+
following:
2727

2828
* ``ax.format(name=value)``
2929
* ``ax.format(rc_kw={'name':value})``
@@ -102,8 +102,8 @@ There are two new additions to the ``image`` category, and the new
102102
`~proplot.axes.Axes.colorbar` properties.
103103
The new ``gridminor`` category controls minor gridline settings,
104104
and the new ``geogrid`` category controls meridian and parallel line settings
105-
for `~proplot.axes.ProjAxes`. For both ``gridminor`` and ``geogrid``, if
106-
a property is empty, the corresponding property from ``grid`` is used.
105+
for `~proplot.axes.ProjAxes`. Note that when a ``grid`` property is changed,
106+
it also changed the corresponding ``gridminor`` property.
107107

108108
Finally, the ``geoaxes``, ``land``, ``ocean``, ``rivers``, ``lakes``,
109109
``borders``, and ``innerborders`` categories control various
@@ -195,11 +195,9 @@ To modify the global settings, edit your
195195
``~/.proplotrc`` file. To modify settings for a particular project,
196196
create a ``.proplotrc`` file in the same directory as your ipython
197197
notebook, or in an arbitrary parent directory.
198+
As an example, a ``.proplotrc`` file containing the default settings
199+
is shown below. The syntax is mostly the same as the syntax used for
200+
`matplotlibrc files <https://matplotlib.org/3.1.1/tutorials/introductory/customizing.html#customizing-with-matplotlibrc-files>`__.
198201

199-
As an example, the default ``.proplotrc`` file
200-
is shown below. The syntax is roughly the same as that used for
201-
``matplotlibrc`` files, although ``.proplotrc`` strictly adheres to
202-
`YAML <https://en.wikipedia.org/wiki/YAML>`__.
203-
204-
.. include:: ../proplot/.proplotrc
202+
.. include:: _static/proplotrc
205203
:literal:

docs/cycles.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"raw_mimetype": "text/restructuredtext"
1414
},
1515
"source": [
16-
"**Color cycles** are palettes composed of a *jumbled set* of distinct colors. Unlike :ref:`Colormaps`, interpolation between these colors does not make sense. Color cycles are generally used with line plots, bar plots, and other plot elements. They are conceptually implemented in matplotlib with the `~matplotlib.colors.ListedColormap` class (although it is often improperly used). ProPlot uses this class to register color cycles, and the color cycles are \"applied\" by globally or locally modifying the `property cycler <https://matplotlib.org/3.1.0/tutorials/intermediate/color_cycle.html>`__. :ref:`Colormaps` can also be cut up and used as color cycles (see :ref:`Making new color cycles`).\n",
16+
"ProPlot defines **color cycles** as color palettes comprising sets of *distinct colors*. Unlike :ref:`colormaps <Colormaps>`, interpolation between these colors may not make sense. Color cycles are generally used with bar plots, line plots, and other distinct plot elements. ProPlot uses the `~proplot.styletools.ListedColormap` class to *name* color cycles, then applies them to plots by updating `the property cycler <https://matplotlib.org/3.1.0/tutorials/intermediate/color_cycle.html>`__. Color cycles can also be made by sampling colormaps (see :ref:`Making new color cycles`).\n",
1717
"\n",
1818
"ProPlot adds several features to help you use color cycles effectively in your figures. This section documents the new registered color cycles, explains how to make and modify colormaps, and shows how to apply them to your plots."
1919
]

docs/environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ dependencies:
1818
- pip
1919
- pip:
2020
- ..
21-
- pyyaml
2221
- pyqt5
2322
- nbsphinx
2423
- sphinx_rtd_theme

0 commit comments

Comments
 (0)