From 6e452dbcc3fdb3a708c32bd0f9e0a99afa08cf1f Mon Sep 17 00:00:00 2001 From: Sergio Souza Costa Date: Fri, 4 Sep 2026 09:06:30 -0300 Subject: [PATCH] update example in readme --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 841fba4..16ab5a2 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ import numpy as np from dissmodel.core import Environment from dissmodel.geo.raster.backend import RasterBackend from haloexec import HaloChunkedRasterCellularAutomaton +from dissmodel.visualization.raster_map import RasterMap class GameOfLife(HaloChunkedRasterCellularAutomaton): def rule(self, arrays): @@ -53,7 +54,16 @@ backend.set("state", np.random.randint(0, 2, (200, 200)).astype(np.uint8)) env = Environment(start_time=1, end_time=50) GameOfLife(backend=backend, block_h=50, block_w=50, halo=1) + +RasterMap( + backend=backend, + band="state", + color_map={0: "#ffffff", 1: "#2f8f6e"}, + labels={0: "morta", 1: "viva"}, + title=f"Padrões clássicos sobre fronteiras de bloco", +) env.run() + ``` The same `GameOfLife` class, inheriting from plain