Skip to content

Daniel-Lomazov/data-visualizer

Repository files navigation

Data Visualizer

Data Visualizer is a small Python project for generating and plotting complex-valued matrices as colorized images. It includes helpers for building sample matrices, normalizing magnitudes, combining phase and magnitude into RGB output, and rendering the result with Matplotlib.

Current release: v0.2.0

What It Does

  • Generates random, diagonal, and unitary complex matrices.
  • Maps complex values to RGB using pluggable normalizers and combine strategies.
  • Plots complex arrays in a single left-to-right row by default.
  • Compares any number of arrays side by side with the same rendering pipeline.
  • Uses bar_orientation to place bars underneath each plot or to the right.
  • Uses show_individual_bars to enable or disable the per-plot bars.
  • Uses single_color_bar to switch to a shared color-bar layout; the top-level helper defaults to the shared layout.
  • Can optionally overlay cell values for small arrays.

Architecture

flowchart TD
	A[main.py] --> B[get_array]
	A --> C[plot_array]

	B --> D[matrices.py]
	D --> D1[RandomMatrixBuilder]
	D --> D2[DiagonalMatrixBuilder]
	D --> D3[UnitaryMatrixBuilder]

	C --> E[ComplexColorMapper]
	E --> F[normalizers.py]
	E --> G[strategies.py]
	C --> H[ComplexArrayPlotter]
	H --> I[Matplotlib figure]

	F --> F1[RationalNormalizer]
	F --> F2[LinearNormalizer]
	F --> F3[LogNormalizer]

	G --> G1[ValueStrategy]
	G --> G2[SaturationStrategy]
	G --> G3[BothStrategy]
	G --> G4[PhaseOnlyStrategy]
	G --> G5[MagnitudeGrayStrategy]
Loading

Quick Start

Install the runtime dependencies:

.venv\\Scripts\\python.exe -m pip install -r requirements.txt

Run the example from the repository root:

.venv\\Scripts\\python.exe main.py

main.py checks for the project virtual environment and exits if you try to run it with a different interpreter.

Example Usage

from api import get_array, plot_array, plot_arrays

arr = get_array(50)
plot_array(arr)

plot_arrays(arr)

plot_arrays(arr, show_individual_bars=False)

plot_arrays(arr, single_color_bar=True)

arr1 = get_array(50)
arr2 = get_array(50)
arr3 = get_array(50)
plot_arrays(arr1, arr2, arr3)

You can also customize the rendering by choosing a different normalizer or combine strategy.

Repository Layout

  • main.py: example entry point and virtual-environment gate.
  • api.py: public API and convenience helpers.
  • matrices.py: complex matrix builders.
  • normalizers.py: magnitude normalization strategies.
  • strategies.py: RGB combine strategies.
  • mapper.py: complex-to-RGB conversion.
  • plotter.py: Matplotlib rendering.

Notes For Publishing

  • Generated Python bytecode and IDE files are ignored by default.
  • The temp/ folder is treated as scratch space and is excluded from source control.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages