Skip to content

Commit

Permalink
Array/process rgb array (#74)
Browse files Browse the repository at this point in the history
* add `scale_percentile` method

* rearrange the `Array` to process the given rgb array by `scale_percentile` instead of the surface reflectance function

* the `statistic.histogram` can plot multiple column array

* add docstring

* add images to docstring

* move docs inside resources folder

* add auto docs

* reformat

* update index

* adjust version number

* add modules

* add autodocs for the array class

* add installation page

* add installation page

* update dependencies in the installation page

* add statistics.py docstring

* update the index file

* add docstring to the array module

* add pytest config file

* update the package description

* update the package description

* correct module name

* correct code block

* add example to Array class

* add example to Array class

* adjust the docs to use pip instead of conda

* adjust the docs to use pip instead of conda

* add doc requirements to the setup.py

* remove the ../. from the docs/requirements.txt file

* add to extra docs to the index.rst

* correct module name

* correct indundations

* remove the environment.yml

* add docs build files

* clean comment statments

* rename the `get_rgb` to `to_rgb`

* rename the `hex_color` attribute to `color_value`

* add example for creating the `colors` object

* add `is_valid_rgb` method and tests

* add doctest to pre-commit hooks

* create `is_valid_hex_i` and `is_valid_rgb_i`

* create `get_type` function

* split the `is_valid_rgb` to two different functions

* add `to_hex` method

* adjust the `to_rgb` for the format

* adjust scripts

* rename the `Array` class to `ArrayGlyph`

* rename the Array class to ArrayGlyph

* rename the array module to array_glyph

* rename the `array` module to `array_glyph`

* reformat styles module

* fix missing array_glyph docs

* abstract the color bar creating lines into a function.

* solve the floating point error in calculating the ticks

* rename the `color_scale` to be `linear`, `power`, ...

* correct the color scale names

* parse the kwargs in the constructors as well as the `plot` method

* adjust the colorbar parameters in the kwargs to start with cbar

* add examples to the `plot` method

* adjust indentations

* adjust indentations

* adjust indentations

* remove class level docstring

* correct indentation

* add more examples

* add more examples

* correct image paths

* add animate example

* convert method to private

* update checklist files
  • Loading branch information
MAfarrag authored Jul 22, 2024
1 parent d43fb43 commit 7ce9159
Show file tree
Hide file tree
Showing 47 changed files with 1,665 additions and 664 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ repos:
language: system
files: \.ipynb$

# - repo: local
# hooks:
# - id: doctest
# name: doctest
# entry: pytest --doctest-modules #pyramids/dataset.py
# language: system
# files: \.py$
- repo: local
hooks:
- id: doctest
name: doctest
entry: pytest --doctest-modules
language: system
files: \.py$
19 changes: 10 additions & 9 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@
# Required
version: 2

sphinx:
configuration: docs/source/conf.py

build:
os: "ubuntu-22.04"
tools:
python: "mambaforge-22.9"
python: "3.12"

conda:
environment: docs/environment.yml
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
#Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml
python:
install:
- method: pip
path: .
extra_requirements:
- docs


# Optionally build your docs in additional formats such as PDF and ePub
Expand Down
18 changes: 18 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,21 @@ History
* Add extent to the array plot when plotting an rgb array.
* Add `ax`, and `fig` parameters to the `Array` constructor method to take an Axes and plot the array on it.
* Add `__str__` to the `Array` class.

0.5.0 (2024-07-22)
------------------

ArrayGlyph
^^^^^^^^^^
* rename the `Array` class to `ArrayGlyph`.
* add `scale_percentile` method to the `Array` class to scale the array using the percentile values.
* the `statistic.histogram` can plot multiple column array.
* change the `color_scale` values to be string (`linear`, "power", ...)
* the `kwargs` can be provided to the constructor or the `plot` method to plot the array.

Colors
^^^^^^
* rename the `get_rgb` to `to_rgb`
* add `get_type` to get the type of the color.
* add `to_hex` to convert the color to hex.
* add `to_rgb` to convert the color to rgb.
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,22 @@ Current release info

cleopatra - matplotlib utility package
=====================================================================
**cleopatra** is a matplotlib utility package
**cleopatra** is a Python package providing fast and flexible way to build visualize data using matplotlib. it
provides functionalities to handle 3D arrays and perform various operations on them,
such as plotting, animating, and displaying the array. it also provides functionalities for creating statistical plots,


Main Features
-------------
The `Array` class has the following functionalities:
- Initialize an array object with the provided parameters.
- Plot the array with optional parameters to customize the appearance and display cell values.
- Animate the array over time with optional parameters to customize the animation speed and display points.
- Display the array with optional parameters to customize the appearance and display point IDs.

The `Statistic` module provides a class for creating statistical plots, specifically histograms. The class, `Statistic`,
is designed to handle both 1D (single-dimensional) and 2D (multi-dimensional) data.

cleopatra


Installing cleopatra
Expand All @@ -48,7 +61,7 @@ pip install git+https://github.com/Serapieum-of-alex/cleopatra
## pip
to install the last release, you can easily use pip
```
pip install cleopatra==0.4.3
pip install cleopatra==0.4.4
```

Quick start
Expand Down
Loading

0 comments on commit 7ce9159

Please sign in to comment.