Name | rijksplotlib JSON |
Version |
1.0.4
JSON |
| download |
home_page | None |
Summary | A datavizualization compliance library for RWS Datalab |
upload_time | 2024-06-19 09:18:02 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
rijksplotlib
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
############
rijksplotlib
############
.. begin-inclusion-intro-marker-do-not-remove
A datavizualization compliance library for RWS Datalab
The goal of this package is to easily transform your standard `matplotlib` figures (left) to better, recognizable and accessible ones (right).
|pic_mpl| |pic_rpl|
.. |pic_mpl| image:: https://gitlab.com/rwsdatalab/public/codebase/tools/rijksplotlib/-/raw/main/doc/static/images/startpagina_1_matplotlib.png
:alt: A screenshot of an RWS report with a default matplotlib plot. The styling of the matplotlib plot does not match the styling of the document.
:width: 350px
.. |pic_rpl| image:: https://gitlab.com/rwsdatalab/public/codebase/tools/rijksplotlib/-/raw/main/doc/static/images/startpagina_3_import_rijksplotlib_and_use_helper_functions.png
:alt: The same screenshot of an RWS report, but with a plot styled using the Rijksplotlib package and helper functions. The figure matches the styling of the document.
:width: 350px
With just a few lines of code, the text in the figure is aligned with the text in an RWS report and the graph dimensions are optimized. Furthermore, the colors and other styling elements are updated to conform to the Rijkshuisstijl and RWS huisstijl.
.. end-inclusion-intro-marker-do-not-remove
.. begin-inclusion-installation-marker-do-not-remove
Installation
------------
To install the ``rijksplotlib`` package, you need to have Python 3.10
or higher installed.
.. code-block:: bash
pip install rijksplotlib
Want to install the Pylint rules included in rijksplotlib in your CI/CD pipeline?
Have a look at the `CI/CD setup guide <https://rwsdatalab.gitlab.io/public/codebase/tools/rijksplotlib/linter.html#gitlab-ci-integration>`_.
Installing from source
^^^^^^^^^^^^^^^^^^^^^^
If you want to work on the ``rijksplotlib`` codebase, you'll probably want to install from source.
Or if you simply want to try out the latest features before they are released.
To install rijksplotlib from source, run this command in your terminal:
.. code-block:: bash
git clone https://gitlab.com/rwsdatalab/public/codebase/tools/rijksplotlib.git
cd rijksplotlib
pip install .
Run tests (including coverage) with:
.. code-block:: bash
pip install ".[dev]"
pytest
Documentation and examples can be generated with:
.. code-block:: bash
pip install ".[doc]"
make --directory=doc html # if using Windows use .\doc\make.bat html
.. warning ::
The documentation dependencies require ``pydantic < 2.0.0``, which is incompatible with the latest version of ``rijksplotlib``.
Therefore, after installing the documentation dependencies, you need to upgrade ``pydantic`` to the latest 2.x version.
.. end-inclusion-installation-marker-do-not-remove
.. begin-inclusion-usage-marker-do-not-remove
Getting started
---------------
Plot your figure in the way you are used to. Then, use ``rlt.show()`` or ``rlt.savefig`` instead of using ``plt.show()`` or ``plt.savefig()`` to show or save the figure.
.. code-block:: python
import rijksplotlib.pyplot as rlt
# plot your graph here #
rlt.show()
# or #
rlt.savefig()
This package helps you optimize your figures for RWS reports. Using the ``rijksplotlib.pyplot.show`` or ``rijksplotlib.pyplot.savefig`` helper functions, it provides feedback when you are missing elements necessary for a good figure. Furthermore, the resulting figure fits precisely within the RWS report preset margins. When you place your figure in a report, the font sizes of all elements are readable and fit in with the rest of the text well.
For more background information on making representative and good figures, see the `Stijlgids Datavisualisatie RWS <https://pleinienw.nl/articles/297813>`_ (intranet).
.. end-inclusion-usage-marker-do-not-remove
.. begin-inclusion-license-marker-do-not-remove
License
-------
.. code-block:: text
Copyright 2023 Rijkswaterstaat
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.. end-inclusion-license-marker-do-not-remove
Raw data
{
"_id": null,
"home_page": null,
"name": "rijksplotlib",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "rijksplotlib",
"author": null,
"author_email": "RWS Datalab <datalab.codebase@rws.nl>",
"download_url": null,
"platform": null,
"description": "############\nrijksplotlib\n############\n\n.. begin-inclusion-intro-marker-do-not-remove\n\nA datavizualization compliance library for RWS Datalab\n\nThe goal of this package is to easily transform your standard `matplotlib` figures (left) to better, recognizable and accessible ones (right).\n\n|pic_mpl| |pic_rpl|\n\n.. |pic_mpl| image:: https://gitlab.com/rwsdatalab/public/codebase/tools/rijksplotlib/-/raw/main/doc/static/images/startpagina_1_matplotlib.png\n :alt: A screenshot of an RWS report with a default matplotlib plot. The styling of the matplotlib plot does not match the styling of the document.\n :width: 350px\n\n.. |pic_rpl| image:: https://gitlab.com/rwsdatalab/public/codebase/tools/rijksplotlib/-/raw/main/doc/static/images/startpagina_3_import_rijksplotlib_and_use_helper_functions.png\n :alt: The same screenshot of an RWS report, but with a plot styled using the Rijksplotlib package and helper functions. The figure matches the styling of the document.\n :width: 350px\n\nWith just a few lines of code, the text in the figure is aligned with the text in an RWS report and the graph dimensions are optimized. Furthermore, the colors and other styling elements are updated to conform to the Rijkshuisstijl and RWS huisstijl.\n\n.. end-inclusion-intro-marker-do-not-remove\n\n\n.. begin-inclusion-installation-marker-do-not-remove\n\nInstallation\n------------\nTo install the ``rijksplotlib`` package, you need to have Python 3.10\nor higher installed.\n\n.. code-block:: bash\n\n pip install rijksplotlib\n\nWant to install the Pylint rules included in rijksplotlib in your CI/CD pipeline?\nHave a look at the `CI/CD setup guide <https://rwsdatalab.gitlab.io/public/codebase/tools/rijksplotlib/linter.html#gitlab-ci-integration>`_.\n\nInstalling from source\n^^^^^^^^^^^^^^^^^^^^^^\nIf you want to work on the ``rijksplotlib`` codebase, you'll probably want to install from source.\nOr if you simply want to try out the latest features before they are released.\nTo install rijksplotlib from source, run this command in your terminal:\n\n.. code-block:: bash\n\n git clone https://gitlab.com/rwsdatalab/public/codebase/tools/rijksplotlib.git\n cd rijksplotlib\n pip install .\n\nRun tests (including coverage) with:\n\n.. code-block:: bash\n\n pip install \".[dev]\"\n pytest\n\nDocumentation and examples can be generated with:\n\n.. code-block:: bash\n\n pip install \".[doc]\"\n make --directory=doc html # if using Windows use .\\doc\\make.bat html\n\n.. warning ::\n\n The documentation dependencies require ``pydantic < 2.0.0``, which is incompatible with the latest version of ``rijksplotlib``.\n Therefore, after installing the documentation dependencies, you need to upgrade ``pydantic`` to the latest 2.x version.\n\n\n.. end-inclusion-installation-marker-do-not-remove\n\n.. begin-inclusion-usage-marker-do-not-remove\n\nGetting started\n---------------\n\nPlot your figure in the way you are used to. Then, use ``rlt.show()`` or ``rlt.savefig`` instead of using ``plt.show()`` or ``plt.savefig()`` to show or save the figure.\n\n.. code-block:: python\n\n import rijksplotlib.pyplot as rlt\n\n # plot your graph here #\n\n rlt.show()\n # or #\n rlt.savefig()\n\n\nThis package helps you optimize your figures for RWS reports. Using the ``rijksplotlib.pyplot.show`` or ``rijksplotlib.pyplot.savefig`` helper functions, it provides feedback when you are missing elements necessary for a good figure. Furthermore, the resulting figure fits precisely within the RWS report preset margins. When you place your figure in a report, the font sizes of all elements are readable and fit in with the rest of the text well.\n\nFor more background information on making representative and good figures, see the `Stijlgids Datavisualisatie RWS <https://pleinienw.nl/articles/297813>`_ (intranet).\n\n.. end-inclusion-usage-marker-do-not-remove\n\n.. begin-inclusion-license-marker-do-not-remove\n\nLicense\n-------\n\n.. code-block:: text\n\n Copyright 2023 Rijkswaterstaat\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n.. end-inclusion-license-marker-do-not-remove\n",
"bugtrack_url": null,
"license": null,
"summary": "A datavizualization compliance library for RWS Datalab",
"version": "1.0.4",
"project_urls": {
"changelog": "https://gitlab.com/rwsdatalab/public/codebase/tools/rijksplotlib/blob/main/CHANGELOG.rst",
"homepage": "https://rwsdatalab.gitlab.io/public/codebase/tools/rijksplotlib/index.html",
"repository": "https://gitlab.com/rwsdatalab/public/codebase/tools/rijksplotlib"
},
"split_keywords": [
"rijksplotlib"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f72fa961047f87f306ce26aa83afcdbec73fa310fc9b4b126300fe408087fa7d",
"md5": "6e63b0627dde447e03d85295fe9ccb64",
"sha256": "6b8155a51f163d4f56f3067192d624aaba892d3710b15c0bddc621af2b4f55c3"
},
"downloads": -1,
"filename": "rijksplotlib-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6e63b0627dde447e03d85295fe9ccb64",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 25840,
"upload_time": "2024-06-19T09:18:02",
"upload_time_iso_8601": "2024-06-19T09:18:02.201178Z",
"url": "https://files.pythonhosted.org/packages/f7/2f/a961047f87f306ce26aa83afcdbec73fa310fc9b4b126300fe408087fa7d/rijksplotlib-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-19 09:18:02",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "rwsdatalab",
"gitlab_project": "public",
"lcname": "rijksplotlib"
}