Skip to content

Commit

Permalink
updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jposada202020 committed Mar 12, 2023
1 parent fed2ee9 commit 163afec
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ For detailed view of the library please refer to the `Quick start guide <https:/
.. image:: https://github.com/jposada202020/CircuitPython_uplot/blob/main/docs/readme2.png


Below a picture oa a real live application. for more information visit the project `page <https://github.com/casainho/temperature_humidity_sensor_eink_display>`_. Thanks to @Casainho

.. image:: https://github.com/jposada202020/CircuitPython_uplot/blob/main/docs/logging.png


Dependencies
=============
This library depends on:
Expand Down
Binary file added docs/logging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/logging.png.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2023 Casainho

SPDX-License-Identifier: MIT
23 changes: 21 additions & 2 deletions docs/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -377,19 +377,38 @@ Logging
===============

This is a similar to Cartesian but designed to allow the user to use it as a data logger.
The user needs to setup manually the range and tick values in order for this graph to work proeprly
The user needs to manually set up the range and tick values in order for this graph to work properly

There are some parameters that you can customize:

* rangex and rangey: you need specify the ranges of your graph. This allows you to move your graph according to your needs. This parameters only accept lists
* ticksx and ticksy: Specific ticks for the X and Y axes
* line_color: you can specify the color in HEX
* tick_pos: Allows to show the ticks below the axes.
* fill: genrates lines under each point, to fill the area under the points
* fill: generates lines under each point, to fill the area under the points


.. code-block:: python
plot = Uplot(0, 0, display.width, display.height)
ulogging(plot, x, y, rangex=[0, 200], rangey=[0, 100], ticksx=[10, 50, 80, 100], ticksy=[15, 30, 45, 60],)
===============
SVG
===============

A small module to load, locate and scale svg path collection of points in the plot area. This will tend to be memory consuming as some SVG will have several path points.
There are some pre-provided icons in the ``icons.py`` file, you could add more if needed.
Specific icons are stored as a dictionary in the icons.py file. Every path is a entry in the dictionary.
For example, if you want to load the Temperature icon with a scale of 2

.. code-block:: python
from circuitpython_uplot.usvg import usvg
from circuitpython_uplot.icons import Temperature
display = board.DISPLAY
plot = Uplot(0, 0, display.width, display.height)
usvg(plot, Temperature, 250, 50, 2)
display.show(plot)

0 comments on commit 163afec

Please sign in to comment.