matplotlib 0.5.6

Quick-and-dirty plotting in Rust using Python and Matplotlib
Documentation
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

### Changed

### Removed

## [0.5.6] - 2026-09-14

### Changed

- Added `From` impls for conversion of borrowed numerical types to `ColorCell`

## [0.5.5] - 2026-09-14

### Added

- Trait `Real` to handle conversion of basic numerical types to `f64` for
  storage in the provided command structs

### Changed

- Provided command constructors are now generic over element types `E: Real`

## [0.5.4] - 2026-09-08

### Added

- New `ContourLabels` command for adding explicit labels to `Contour` plots

## [0.5.3] - 2026-09-07

### Added

- Additional `PyValue` conversions:
    - `From<ColorCell>`
    - `From<Vec<T: Into<PyValue>>>`
    - `From<[T: Into<PyValue>; N]>`
    - `From<&[T: Into<PyValue> + Clone]>`
    - `From<HashMap<S: Into<String>, T: Into<PyValue>>>`

## [0.5.2] - 2026-09-06

### Added

- New `ColorCell` enum as an element data type for `Imshow` and `Colorplot` for
  direct RGB/RGBA arrays
- Add column-major constructors for `Imshow` and `Colorplot`

### Changed

- Make `Imshow` and `Colorplot` constructors generic over `Into<ColorCell>`

## [0.5.1] - 2026-09-05

### Added

- New plotting command `Colorplot`; like `Imshow`, but for non-uniform pixel
  coordinates

### Changed

- Fixed docstring typo: flattened, "column-major" iterators are actually
  expected in row-major order
- Update README and top-level example (in `lib.rs`) now that `DefPrelude` and
  `DefInit` are no longer used

## [0.5.0] - 2026-07-25

### Changed

- `Mpl` plot initialization shortcuts now properly route through
  `Mpl::with_init`
- Relicense to Apache-2.0

### Added

- New `CloseFig` plotting command for better behavior with other
  (re)initialization commands

## [0.4.0] - 2026-07-24

### Changed

- Prelude items are now placed after imports but before plot initialization,
  rather than after initialization alongside non-prelude commands.
- `RcParam` is now a prelude item.

## [0.3.0] - 2026-06-25

### Added

- `AsPy` implementations for tuples (1- through 12-tuples) and `Option<T>`.
- `From<Option<T>>` implementation for `PyValue`.
- Builder methods on `Mpl` for customizing the Python executable
  (`with_python`/`set_python`, `with_python_args`/`set_python_args`), import
  block (`with_imports`/`set_imports`), and initialization block
  (`with_init`/`set_init`).
- `concat_with` method on `Mpl` as a by-reference alternative to `concat`.
- New plotting commands.

### Changed

- Renamed public constant `PRELUDE` to `IMPORTS`.
- `AsPy` for `f64` now correctly handles NaN and infinity values.
- `AsPy` for `&str`/`String` now properly escapes special characters.
- `concat` now takes `self` and `other` by value instead of by reference.
- Import and initialization code is now stored on `Mpl` directly rather than
  being managed through `DefPrelude`/`DefInit` command objects. The default
  matplotlib backend (`QtAgg`) is no longer forced; use the `Backend` command
  to choose one explicitly.
- File paths in generated Python scripts are now properly escaped.
- The Python executable used by `Mpl::run` is now configurable (defaults to
  `python3`).

### Removed

- `PyValue::Var` variant.

## [0.2.0] - 2024-10-25

### Added

- New object interface to the initialization procedures previously only
  accessible as constructor methods of `Mpl`. Namely, the methods `new_3d`,
  `new_grid`, and `new_gridspec` now have associated "command types" `Init3D`,
  `InitGrid`, and `InitGridSpec`. This is to solve the problem of being able to
  combine styling (e.g. `rcParam` settings) with more complicated figures. These
  constructor methods now use the new types internally, and additional
  constructors `new_3d_with`, `new_grid_with`, and `new_gridspec_with` have also
  been added as another way to solve this problem.

### Changed

- Dumb code style changes regarding line breaks around assignment operators.

## [0.1.1] - 2024-10-21

### Changed

- Replaced incorrect references in README code examples to `mpl` as a crate
  name; the name is actually `matplotlib`.
- Instead of dumbly recording all prelude and non-prelude commands in the same
  vector in `Mpl`, separate them out so that the command list doesn't have to be
  re-sorted all the time.

## [0.1.0] - 2024-08-01

### Added

- First working release