Skip to content

Commit fc62ef4

Browse files
committed
Merge master
2 parents 83c2405 + 9f44072 commit fc62ef4

File tree

5 files changed

+21
-17
lines changed

5 files changed

+21
-17
lines changed

docs/_static/custom.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This file contains edits to the RTD theme CSS style
2-
* sheets. The latter requires a _templates/layout.html file.
2+
* sheets. Requires a _templates/layout.html file.
33
* https://learn.shayhowe.com/advanced-html-css/complex-selectors/
44
* - item is tag e.g. <item></item>
55
* - #item is id e.g. <p id="item"></p>
@@ -424,4 +424,3 @@ a:visited,
424424
#lightdark-label:hover input:checked + div.btn-neutral:before {
425425
content: "Light mode";
426426
}
427-

docs/_static/custom.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
/* Toggle light and dark theme */
2-
/* See: https://dev.to/ananyaneogi/create-a-dark-light-mode-switch-with-css-variables-34l8 */
3-
/* CSS files from: https://github.com/richleland/pygments-css */
4-
/* Toggle functions and event handler */
5-
/* Best light themes: pastie, friendly, murhpy */
6-
/* Best dark themes: monokai, paraiso-dark */
1+
/* Toggle light and dark theme
2+
* See: https://dev.to/ananyaneogi/create-a-dark-light-mode-switch-with-css-variables-34l8
3+
* CSS files from: https://github.com/richleland/pygments-css
4+
* Toggle functions and event handler
5+
* Best light themes: pastie, friendly, murhpy
6+
* Best dark themes: monokai, paraiso-dark
7+
*/
78
var regex = /(.*)\/.*(\.css$)/i
89
const toggleSwitch = document.getElementById('lightdark-checkbox');
910
const pygmentsLink = document.getElementById('pygments-style');

docs/why.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ No more boilerplate
2525

2626
<h3>Problem</h3>
2727

28-
Power users often need to change lots of plot settings all at once. In matplotlib, this requires a bunch of one-liner setters and getters, like `~matplotlib.axes.Axes.set_title`.
28+
Power users often need to change lots of plot settings all at once. In matplotlib, this requires a bunch of one-liner setters and getters, like `~matplotlib.axes.Axes.set_title`.
2929

3030
This workflow is verbose and often confusing. It can be unclear whether settings can be changed from a `~matplotlib.figure.Figure` setter, an `~matplotlib.axes.Axes` setter, an `~matplotlib.axis.XAxis` or `~matplotlib.axis.YAxis` setter, or a miscellaneous bulk function like `~matplotlib.axes.Axes.tick_params`.
3131

@@ -72,7 +72,11 @@ Matplotlib and cartopy introduce a bunch of classes with verbose names like `~ma
7272

7373
*Other* parts of the matplotlib API were designed with this in mind.
7474
`Native axes projections <https://matplotlib.org/3.1.1/api/projections_api.html>`__,
75-
`axis scale classes <https://matplotlib.org/3.1.0/gallery/scales/scales.html>`__, and `colormap instances <https://matplotlib.org/3.1.1/gallery/color/colormap_reference.html>`__ are referenced with "registered" string names,
75+
`axis scale classes <https://matplotlib.org/3.1.0/gallery/scales/scales.html>`__,
76+
`box style classes <https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.patches.FancyBboxPatch.html?highlight=boxstyle>`__, `arrow style classes <https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.patches.FancyArrowPatch.html?highlight=arrowstyle>`__,
77+
`arc style classes <https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.patches.ConnectionStyle.html?highlight=class%20name%20attrs>`__, and
78+
`backends <https://matplotlib.org/faq/usage_faq.html#what-is-a-backend>`__
79+
are referenced with "registered" string names,
7680
as are `basemap projection types <https://matplotlib.org/basemap/users/mapsetup.html>`__.
7781
If these are already "registered", why not "register" everything else?
7882

@@ -180,7 +184,7 @@ individual subplots and along contiguous subplots on the edge of the figure:
180184
* Outer colorbars and legends don't mess up the subplot layout or subplot aspect ratios, since `~proplot.subplots.FlexibleGridSpec` permits variable spacing between subplot rows and columns. This is critical e.g. if you have a colorbar between columns 1 and 2 but nothing between columns 2 and 3.
181185
* `~proplot.subplots.Figure` and `~proplot.axes.Axes` colorbar widths are specified in *physical* units rather than relative units. This makes colorbar thickness independent of figure size and easier to get just right.
182186

183-
The colorbar and legend commands also add several new features, like colorbars-from-lines and centerd-row legends. And to make `~proplot.axes.Axes` `~proplot.axes.Axes.colorbar` consistent with `~proplot.axes.Axes` `~proplot.axes.Axes.legend`, you can also now draw *inset* colorbars. See :ref:`Colorbars and legends` for details.
187+
The colorbar and legend commands also add several new features, like colorbars-from-lines and centered-row legends. And to make `~proplot.axes.Axes` `~proplot.axes.Axes.colorbar` consistent with `~proplot.axes.Axes` `~proplot.axes.Axes.legend`, you can also now draw *inset* colorbars. See :ref:`Colorbars and legends` for details.
184188

185189
The axes container class
186190
========================
@@ -334,7 +338,7 @@ the "blue marble". But once these are added to cartopy, ProPlot may remove the `
334338

335339
..
336340
This is the right decision: Cartopy is integrated more closely with the matplotlib API
337-
and is more amenable to further development.
341+
and is more amenable to further development.
338342
339343
Colormaps and property cycles
340344
=============================

proplot/rctools.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -791,10 +791,9 @@ def backend_setup(backend=None, fmt=None):
791791
# Configure inline backend no matter what type of session this is
792792
# Should be silently ignored for terminal ipython sessions
793793
ipython.magic("config InlineBackend.figure_formats = ['" + fmt + "']")
794-
# no notebook-specific overrides
795-
ipython.magic('config InlineBackend.rc = {}')
794+
ipython.magic('config InlineBackend.rc = {}') # no notebook overrides
796795
ipython.magic('config InlineBackend.close_figures = True') # memory issues
797-
# use ProPlot tight layout
796+
# Use ProPlot tight layout
798797
ipython.magic(
799798
"config InlineBackend.print_figure_kwargs = {'bbox_inches':None}")
800799

@@ -842,11 +841,11 @@ def autosave_setup(autosave=None):
842841
pass
843842

844843

845-
# Call setup functions and declare rc object
846-
# WARNING: Must be instantiated after ipython notebook setup!
847844
#: Instance of `rc_configurator`. This is used to change global settings.
848845
#: See :ref:`Configuring proplot` for details.
849846
rc = rc_configurator()
847+
848+
# Call setup functions
850849
backend_setup()
851850
autoreload_setup()
852851
autosave_setup()

proplot/wrappers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2612,6 +2612,7 @@ def legend_wrapper(
26122612
for obj in leg.get_texts():
26132613
if isinstance(obj, martist.Artist):
26142614
obj.update(kw_text)
2615+
26152616
# Append attributes and return, and set clip property!!! This is critical
26162617
# for tight bounding box calcs!
26172618
for leg in legs:

0 commit comments

Comments
 (0)