# 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.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