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

Skip to content

Clean up rc_configurator #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 34 commits into from
Jan 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b9667cf
Initial commit
lukelbd Dec 19, 2019
83ef32c
Merge branch 'master' into rc-cleanup-fixes
lukelbd Jan 6, 2020
e464a99
Move default props from .proplotrc --> rctools.py
lukelbd Jan 6, 2020
e760807
Improve rc_configurator getitem/setitem, add helper func
lukelbd Jan 6, 2020
d6b6020
Update get(), fill(), category(); add dict() and iterator methods
lukelbd Jan 6, 2020
a82dd68
Fix rc_configurator.context() bug
lukelbd Jan 6, 2020
dea6d94
Improve iter, contains, and string repr methods
lukelbd Jan 6, 2020
44a4bc9
Improve _loc_translate + _get_title_props, related cleanup
lukelbd Jan 7, 2020
424bc67
Remove Axes.context, update rc lookups, related cleanup
lukelbd Jan 7, 2020
8e7655e
Add x/ylinewidth, x/ygridcolor XYAxes.format kwargs
lukelbd Jan 7, 2020
25f7bd8
Fix rc lookups in other files
lukelbd Jan 7, 2020
77e406a
Remove Axes.context, add documented Axes.number prop
lukelbd Jan 7, 2020
61a45d4
Update changelog and index
lukelbd Jan 7, 2020
93c8aa5
Cleaner install instructions
lukelbd Jan 7, 2020
da123eb
Remove rc._init reference
lukelbd Jan 7, 2020
5b45522
Fix bug/conflict between ipython_* funcs and rc.__init__
lukelbd Jan 7, 2020
1bf78ce
Remove _getitem_mode assignment
lukelbd Jan 7, 2020
3c44865
Add _get_space function, simplify _panel_kwargs function
lukelbd Jan 7, 2020
3fb9a52
Rename _panel_kwargs --> _get_panelargs
lukelbd Jan 7, 2020
dba9f70
Use _get_space; remove refs to subplots.ylabspace, etc.
lukelbd Jan 7, 2020
fdfe042
Update default font sizes
lukelbd Jan 7, 2020
3218c2a
Change refs from panelspace --> panelpad
lukelbd Jan 7, 2020
1ab92ca
Remove subplots.ylabspace, etc. from configuration docs
lukelbd Jan 7, 2020
16ae44f
Fix _loc_translate bug
lukelbd Jan 7, 2020
6629efb
Remove panel_kw from colorbar/legend_wrapper
lukelbd Jan 7, 2020
ef33694
Update changelog
lukelbd Jan 7, 2020
20b9f5b
No longer change figure.dpi
lukelbd Jan 7, 2020
db78bc0
Fix rc.category bug, minor subplots bugs
lukelbd Jan 7, 2020
c57c7b0
Prefer closing brackets on new lines
lukelbd Jan 7, 2020
578aa8b
Better install instructions
lukelbd Jan 7, 2020
7acffb6
Update changelog
lukelbd Jan 7, 2020
8da19f5
Remove outdated cache=False ref, remove debug statement
lukelbd Jan 7, 2020
3ca9a02
Minor BasemapAxes bugfix
lukelbd Jan 7, 2020
22af8f9
Notebook examples formatting improvements
lukelbd Jan 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 25 additions & 20 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ ProPlot v0.5.0 (2020-##-##)
===========================
.. rubric:: Deprecated

- Remove ``subplots.innerspace``, ``subplots.titlespace``,
``subplots.xlabspace``, and ``subplots.ylabspace`` spacing arguments,
automatically calculate default non-tight spacing using `~proplot.subplots._get_space`
based on current tick lengths, label sizes, etc.
- Rename `basemap_defaults` to `~proplot.projs.basemap_kwargs` and `cartopy_projs`
to `~proplot.projs.cartopy_names` (:commit:`431a06ce`).

Expand All @@ -32,22 +28,12 @@ ProPlot v0.5.0 (2020-##-##)
*or* `~proplot.subplots.subplots` (:pr:`50`). This is a major improvement!
- `~proplot.subplots.GridSpec` now accepts physical units, rather than having
`~proplot.subplots.subplots` handle the units (:pr:`50`).
- Add `xlinewidth`, `ylinewidth`, `xgridcolor`, `ygridcolor` keyword
args to `~proplot.axes.XYAxes.format` (:pr:`50`).
- Allow "hanging" twin *x* and *y* axes as members of the `~proplot.subplots.EdgeStack`
container. Arbitrarily many siblings are now permitted.
- Use `~proplot.subplots.GeometrySolver` for calculating various automatic layout
stuff instead of having 1000 hidden `~proplot.subplots.Figure` methods (:pr:`50`).
- Use `~proplot.subplots.EdgeStack` class for handling
stacks of colorbars, legends, and text (:pr:`50`).
- `~proplot.rctools.rc` `~proplot.rctools.rc_configurator.__getitem__` always
returns the setting; "caching" can only be used *explicitly* by passing ``cache=True`` to
`~proplot.rctools.rc_configurator.get`, `~proplot.rctools.rc_configurator.fill`, and
`~proplot.rctools.rc_configurator.category` (:pr:`50`).

.. rubric:: Bug fixes

- Fix `~proplot.rctools.rc_configurator.context` fatal bug (:issue:`80`).

.. rubric:: Internals

Expand All @@ -56,23 +42,33 @@ ProPlot v0.5.0 (2020-##-##)
- Panels, colorbars, and legends are now members of `~proplot.subplots.EdgeStack`
stacks rather than getting inserted directly into
the main `~proplot.subplots.GridSpec` (:pr:`50`).
- Define `~proplot.rctools.rc` default values with inline dictionaries rather than
with a default ``.proplotrc`` file, change the auto-generated user ``.proplotrc``
(:pr:`50`).

ProPlot v0.4.0 (2020-##-##)
===========================
.. rubric:: Deprecated

- Remove redundant `~proplot.rctools.use_fonts`, use ``rcParams['sans-serif']``
precedence instead (:pr:`95`).
- `~proplot.axes.Axes.dualx` and `~proplot.axes.Axes.dualx` no longer accept "scale-spec" arguments, must be a function, two functions, or an axis scale instance (:pr:`96`).
- `~proplot.axes.Axes.dualx` and `~proplot.axes.Axes.dualx` no longer accept "scale-spec" arguments.
Must be a function, two functions, or an axis scale instance (:pr:`96`).
- Remove ``subplots.innerspace``, ``subplots.titlespace``,
``subplots.xlabspace``, and ``subplots.ylabspace`` spacing arguments,
automatically calculate default non-tight spacing using `~proplot.subplots._get_space`
based on current tick lengths, label sizes, etc.

.. rubric:: Features

- Add Fira Math as DejaVu Sans-alternative (:pr:`95`). Has complete set of math characters.
- Add TeX Gyre Heros as Helvetica-alternative (:pr:`95`). This is the new open-source default font.
- Add `~proplot.subplots.Figure` ``fallback_to_cm`` kwarg. This is used by `~proplot.styletools.show_fonts` to show dummy glyphs to clearly illustrate when fonts are missing characters, but preserve graceful fallback for end user.
- Add `xlinewidth`, `ylinewidth`, `xgridcolor`, `ygridcolor` keyword
args to `~proplot.axes.XYAxes.format` (:pr:`95`).
- Add `~proplot.subplots.Figure` ``fallback_to_cm`` kwarg. This is used by
`~proplot.styletools.show_fonts` to show dummy glyphs to clearly illustrate when fonts are
missing characters, but preserve graceful fallback for end user.
- `~proplot.rctools.rc` `~proplot.rctools.rc_configurator.__getitem__` always
returns the setting. To get context block-restricted settings, you must explicitly pass
``context=True`` to `~proplot.rctools.rc_configurator.get`, `~proplot.rctools.rc_configurator.fill`,
or `~proplot.rctools.rc_configurator.category` (:pr:`91`).

.. rubric:: Bug fixes

Expand All @@ -84,7 +80,16 @@ ProPlot v0.4.0 (2020-##-##)
.. rubric:: Documentation

- Imperative mood for docstring summaries (:pr:`92`).
- Fix `~proplot.styletools.show_cycles` bug (:pr:`90`) and show cycles using colorbars rather than lines.
- Fix `~proplot.styletools.show_cycles` bug (:pr:`90`) and show cycles using colorbars
rather than lines.

.. rubric:: Internals

- Define `~proplot.rctools.rc` default values with inline dictionaries rather than
with a default ``.proplotrc`` file, change the auto-generated user ``.proplotrc``
(:pr:`91`).
- Remove useless `panel_kw` keyword arg from `~proplot.wrappers.legend_wrapper` and
`~proplot.wrappers.colorbar_wrapper` (:pr:`91`).

ProPlot v0.3.1 (2019-12-16)
===========================
Expand Down
10 changes: 2 additions & 8 deletions INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
Installation
============

ProPlot can be installed with `pip <https://pypi.org>`__ or `conda <https://anaconda-project.readthedocs.io/en/latest/>`__:
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:

.. code-block:: bash

pip install proplot

.. code-block:: bash

conda install -c conda-forge proplot

An existing installation of ProPlot can be upgraded to the latest version with:
Likewise, an existing installation of ProPlot can be upgraded to the latest version with:

.. code-block:: bash

pip install --upgrade proplot

.. code-block:: bash

conda upgrade proplot


Expand Down
11 changes: 2 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,20 @@ A comprehensive, easy-to-use `matplotlib <https://matplotlib.org/>`__ wrapper fo
Installation
============

ProPlot can be installed with `pip <https://pypi.org>`__ or `conda <https://anaconda-project.readthedocs.io/en/latest/>`__:
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:

.. code-block:: bash

pip install proplot

.. code-block:: bash

conda install -c conda-forge proplot

An existing installation of ProPlot can be upgraded to the latest version with:
Likewise, an existing installation of ProPlot can be upgraded to the latest version with:

.. code-block:: bash

pip install --upgrade proplot

.. code-block:: bash

conda upgrade proplot


If you used ``pip install git+https://github.com/lukelbd/proplot.git`` to install ProPlot before it was released on PyPi, you may need to run ``pip uninstall proplot`` before upgrading.
To install a development version of ProPlot, you can use this same method, or clone the repository and run ``pip install --upgrade .`` inside the ``proplot`` folder.

Expand Down
Loading