Skip to content

Commit

Permalink
updates to the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kislovskiy committed Mar 18, 2024
1 parent 6a90f2d commit 911b16d
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 24 deletions.
12 changes: 8 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ Contents
resources
terminology

About the Autors
----------------

Artem
About the Authors
-----------------

**Artem Kislovskiy** is a professional software engineer who is playing with computers for fun and profit.
With a background in computational physics, Artem's journey into programming and data visualisation began during his academic pursuits.
Having previously contributed to projects at EPFL, he remains actively engaged with the research community.
Artem is a vice chair of EuroPython Society and a one of the organisers of EuroPython and EuroSciPy conferences.
He resides in Lausanne with his wife and their beloved canine companion.

Teresa
22 changes: 14 additions & 8 deletions docs/source/section_1.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
1. Exploring Matplotlib Internals: Figures, Axes, and More
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==========================================================
.. section_1:
In this section
~~~~~~~~~~~~~~~

We will learn how to create figures consistent with the rest of the document.
A consistent figure is one that has the same font properties, proper size, and resolution.
We will use the `rich` library to inspect matplotlib objects when exploring the properties.
And learn a lot about matplotlib Figure and Axis objects.

Figure
~~~~~~
Expand Down Expand Up @@ -83,13 +87,13 @@ TODO: link to the jupyter notebook.

* `Figure size in different units <https://matplotlib.org/stable/gallery/subplots_axes_and_figures/figure_size_units.html#sphx-glr-gallery-subplots-axes-and-figures-figure-size-units-py>`_

* https://matplotlib.org/stable/gallery/text_labels_and_annotations/fonts_demo.html#sphx-glr-gallery-text-labels-and-annotations-fonts-demo-py
* `Fonts demo (object-oriented style) <https://matplotlib.org/stable/gallery/text_labels_and_annotations/fonts_demo.html#sphx-glr-gallery-text-labels-and-annotations-fonts-demo-py>`_

* https://matplotlib.org/stable/gallery/text_labels_and_annotations/font_file.html#sphx-glr-gallery-text-labels-and-annotations-font-file-py
* `Using ttf font files <https://matplotlib.org/stable/gallery/text_labels_and_annotations/font_file.html#sphx-glr-gallery-text-labels-and-annotations-font-file-py>`_

* https://matplotlib.org/stable/gallery/text_labels_and_annotations/font_family_rc.html#sphx-glr-gallery-text-labels-and-annotations-font-family-rc-py
* `Configuring the font family <https://matplotlib.org/stable/gallery/text_labels_and_annotations/font_family_rc.html#sphx-glr-gallery-text-labels-and-annotations-font-family-rc-py>`_

* https://matplotlib.org/stable/gallery/text_labels_and_annotations/usetex_fonteffects.html#sphx-glr-gallery-text-labels-and-annotations-usetex-fonteffects-py
* `Usetex Fonteffects <https://matplotlib.org/stable/gallery/text_labels_and_annotations/usetex_fonteffects.html#sphx-glr-gallery-text-labels-and-annotations-usetex-fonteffects-py>`_

Anatomy of a Figure
~~~~~~~~~~~~~~~~~~~
Expand All @@ -105,9 +109,11 @@ Anatomy of a Figure
Axes
~~~~

* https://matplotlib.org/stable/gallery/axisartist/axis_direction.html#sphx-glr-gallery-axisartist-axis-direction-py
Axes != Axis. Here are some doc links:

* https://matplotlib.org/stable/gallery/axisartist/demo_axisline_style.html#sphx-glr-gallery-axisartist-demo-axisline-style-py
* `Axis <https://matplotlib.org/stable/gallery/axisartist/axis_direction.html#sphx-glr-gallery-axisartist-axis-direction-py>`_

* `Axis line styles <https://matplotlib.org/stable/gallery/axisartist/demo_axisline_style.html#sphx-glr-gallery-axisartist-demo-axisline-style-py>`_

When you create a figure with `plt.figure()`, it is empty.
You need to add axes to it to start plotting.
Expand All @@ -119,7 +125,7 @@ When we plot something, we are actually adding attributes to the Axes object.

But how do I know that?

That's where **debugging** techiniqes come in handy.
That's where **debugging** techniques come in handy.

One of my favorite tools for exploring objects is the `rich <https://rich.readthedocs.io/en/stable/introduction.html>`_ library.
`Inspect <https://rich.readthedocs.io/en/stable/reference/init.html?highlight=inspect#rich.inspect>`_ function is a fantastic debug aid that can be used to explore objects in Python.
Expand Down
19 changes: 18 additions & 1 deletion docs/source/section_2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,24 @@
In this section
---------------

We will encapsulate common plotting patterns to functions.
We will encapsulate common plotting patterns into functions.
This will allow us to create complex figures with less code.
Plus, it makes experiments more enjoyable and less error-prone.

Creating abstractions
---------------------

There is nothing wrong with starting with a new script whenever you want to create a new figure.
However, as time passes, you will notice you are repeating yourself.
At the same time, maintaining your code is getting harder and harder.
You'll discover something cool and new, and you would also like the older code to benefit from it.

The solution for this is to review your code refactor often.
Let's take a practical look at this.

TODO: Add a notebook where we'll draw a dinosaur and add some linear algebra.

Summary
_______


20 changes: 18 additions & 2 deletions docs/source/section_3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,21 @@
In this section
---------------

We will create and publish our visualization toolbox to pypi.
Along the way we will encounter ...
We will learn how to create and publish our visualization toolbox so that we can use it everywhere.
Along the way, we will encounter some of the most common issues that arise when creating a package and how to solve them.

Python packages
---------------

We all know that Python comes with batteries included, but what if someone else wants to use the batteries you have created?
Creating a Python package is the easiest way to share your code with others.
A Python package is a collection of modules that can be easily distributed and installed.

One of the best and shortest introductions to Python packaging is `"How to Publish an Open-Source Python Package to PyPI" <https://realpython.com/pypi-publish-python-package/>`_ by Geir Arne Hjelle.
In this section, we'll explore the `"ChartCruftHub" <https://github.com/Kislovskiy/ChartCraftHub/>`_ repository and learn how to use it as a template for creating our own package.

Summary
-------

We've learned how to create and publish a Python package to PyPI.

30 changes: 21 additions & 9 deletions docs/source/terminology.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,31 @@ Terminology
Common vocabluary used
----------------------

Figure: n 1. a number or numerical symbol.
4. a geometric or decorative shape defined by one or more lines.
5. a diagram or illustrative drawing
v. 1. play an important part.
**Figure**
*n*
1. a number or numerical symbol.
2. a geometric or decorative shape defined by one or more lines.
3. a diagram or illustrative drawing

*v*
1. play an important part.
2. calculate arithmetically
3. (figre someone/thing out) understand someone or something.
4. think; consider.

Chart: n. 1. a sheet of information in the form of a table, graph, or diagram.
Craft: n. 1. an activity involving skill in making things by hand.
2. skill in carrying out work.
Hub: n. 1. the central part of a wheel, rotating on or with the axle.
2. the cetnre of an activity or region.

**Chart**
*n*
1. a sheet of information in the form of a table, graph, or diagram.


**Craft**
*n*
1. an activity involving skill in making things by hand.
2. skill in carrying out work.


**Hub**
*n*
1. the central part of a wheel, rotating on or with the axle.
2. the centre of an activity or region.

0 comments on commit 911b16d

Please sign in to comment.