Skip to content

Added Dynamic Colour Scaling #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Vincenzo-Verma
Copy link

FIxes #76

Dynamic Color Scaling

The GeoPlot visualizer now supports dynamic color scaling for better visual appeal and quantitative analysis. The following features have been added:

  1. Automatic Color Scaling: The color gradient scale is automatically adjusted based on the minimum and maximum values of the property being visualized.

  2. Manual Color Scaling: Users can optionally specify a manual color scale by providing a manual_color_scale parameter in the options. This parameter should be a tuple (min_value, max_value).

Example Usage

from agent_torch.visualize import GeoPlot

# create a visualizer
geoplot = GeoPlot(config, {
    "cesium_token": "...",
    "step_time": 3600,
    "coordinates": "agents/consumers/coordinates",
    "feature": "agents/consumers/money_spent",
    "visualization_type": "color",
    "manual_color_scale": (0, 1000),  # Optional manual color scale
})

# visualize in the runner-loop
for i in range(0, num_episodes):
    runner.step(num_steps_per_episode)
    geoplot.render(runner.state_trajectory)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[C4GT Community]: Add Dynamic Color Scaling to GeoPlot Visualizer
1 participant