Skip to content

Commit

Permalink
Merge pull request #34 from EzequielPuerta/33-allow-zminzmax-again
Browse files Browse the repository at this point in the history
🐛 Zmin and Zmax allowed again for animated plotters.
  • Loading branch information
EzequielPuerta committed Jun 30, 2024
2 parents 8fd3313 + e791c31 commit 95b52e7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ jobs:
command: |
export GITHUB_HOSTNAME="github.com"
set -- "$@" --notes-file "./CHANGELOG.md"
set -- "$@" --title "simulab v0.0.16"
set -- "$@" --title "simulab v0.0.17"
set -- "$@" --repo "$(git config --get remote.origin.url)"
gh release create "0.0.16" "$@"
gh release create "0.0.17" "$@"
workflows:
build_test_publish:
jobs:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.0.17] - 2024-06-30

### Added

Zmin and Zmax allowed again for animated plotters.

## [0.0.16] - 2024-06-30

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "simulab"
version = "0.0.16"
version = "0.0.17"
description = "Simple simulation framework, created during a course of the Discrete Events Simulation Laboratory, from the University of Buenos Aires (https://modsimu.exp.dc.uba.ar/sed/)"
authors = ["Armando Ezequiel Puerta <armando.ezequiel.puerta@gmail.com>"]
license = "MIT License"
Expand Down
6 changes: 5 additions & 1 deletion simulab/simulation/plotters/animated_lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ def show_up(
attributes_to_consider: List[str] | None = None,
speed: float = 1 / 10,
colorscale: str = "Viridis",
zmin: float | None = None,
zmax: float | None = None,
) -> None:
assert (
0 <= experiment_id < len(runner.experiments)
Expand All @@ -37,7 +39,9 @@ def show_up(
)
_plot_title = f"{plot_title}<br>{params_data[0]}"
series = experiment.series[series_name]
zmin, zmax = cls.calculate_global_min_max(series)
_zmin, _zmax = cls.calculate_global_min_max(series)
zmin = _zmin if zmin is None else zmin
zmax = _zmax if zmax is None else zmax

figure = go.Figure(
frames=[
Expand Down
7 changes: 5 additions & 2 deletions simulab/simulation/plotters/categorical_animated_lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ def show_up(
zname: str = "z",
all_categories_name: str = "All",
colorscale: str = "Viridis",
x_categories_position: float = 1.13,
show_labels: bool = False,
zmin: float | None = None,
zmax: float | None = None,
) -> None:
assert (
0 <= experiment_id < len(runner.experiments)
Expand All @@ -41,7 +42,9 @@ def show_up(
)
_plot_title = f"{plot_title}<br>{params_data[0]}"
series = experiment.series[series_name]
zmin, zmax = cls.calculate_global_min_max(series)
_zmin, _zmax = cls.calculate_global_min_max(series)
zmin = _zmin if zmin is None else zmin
zmax = _zmax if zmax is None else zmax
categories = [str(agent_type) for agent_type in range(experiment.agent_types)]
categories = [all_categories_name] + categories

Expand Down

0 comments on commit 95b52e7

Please sign in to comment.