Skip to content
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

plt.show() - which library is this? #202

Closed
gac55 opened this issue Apr 21, 2016 · 5 comments
Closed

plt.show() - which library is this? #202

gac55 opened this issue Apr 21, 2016 · 5 comments

Comments

@gac55
Copy link

gac55 commented Apr 21, 2016

I am working my way through the introduction tutorial.

I set up the first model but cannot plot the first graph. What library is 'plt' from?

I tried installing matplotlib.pyplot as plt but ran in to a host of matoplotlib virtualenv issues, as documented here.

@jackiekazil
Copy link
Member

jackiekazil commented Apr 21, 2016 via email

@dmasad
Copy link
Member

dmasad commented Apr 21, 2016

Yes, that's unfortunately a known issue with Matplotlib. You can also read more about it here:
http://matplotlib.org/faq/virtualenv_faq.html#osx

Another workaround is installing the older version of matplotlib, i.e.:

$ pip install matplotlib==1.4.3

@gac55
Copy link
Author

gac55 commented Apr 21, 2016

Thanks @dmasad, that worked!

Now I just need to look at the best way of actually seeing the output. plt.show() doesn't work on the command line

@dmasad
Copy link
Member

dmasad commented Apr 21, 2016

Terrific!

plt.show() should work from the command line -- but if you want to work with the models interactively, I strongly suggest you check out IPython / Jupyter Notebooks.

@gac55
Copy link
Author

gac55 commented Apr 23, 2016

I checked out and concur. Thanks!

@gac55 gac55 closed this as completed Apr 23, 2016
EwoutH added a commit that referenced this issue Oct 12, 2024
This PR completes the migration from schedulers to AgentSet functionality across the mesa-examples repository for all regular (non-`gis`/-`rl`) examples. Key changes include:

- Replaced `RandomActivation`, `SimultaneousActivation`, and `RandomActivationByType` schedulers with appropriate AgentSet methods
- Updated `Model.step()` implementations to use AgentSet activation
- Removed references to `schedule.steps`, `schedule.agents`, and `schedule.agents_by_type`
- Updated agent addition/removal logic to work with AgentSets
- Adjusted data collection and visualization code to use `Model.steps` and `Model.agents`

For more details on migrating from schedulers to AgentSets, see the migration guide: https://mesa.readthedocs.io/en/latest/migration_guide.html#time-and-schedulers
EwoutH added a commit to EwoutH/mesa that referenced this issue Oct 15, 2024
…mesa#202)

This PR completes the migration from schedulers to AgentSet functionality across the mesa-examples repository for all regular (non-`gis`/-`rl`) examples. Key changes include:

- Replaced `RandomActivation`, `SimultaneousActivation`, and `RandomActivationByType` schedulers with appropriate AgentSet methods
- Updated `Model.step()` implementations to use AgentSet activation
- Removed references to `schedule.steps`, `schedule.agents`, and `schedule.agents_by_type`
- Updated agent addition/removal logic to work with AgentSets
- Adjusted data collection and visualization code to use `Model.steps` and `Model.agents`

For more details on migrating from schedulers to AgentSets, see the migration guide: https://mesa.readthedocs.io/en/latest/migration_guide.html#time-and-schedulers
EwoutH added a commit to EwoutH/mesa that referenced this issue Oct 15, 2024
…mesa#202)

This PR completes the migration from schedulers to AgentSet functionality across the mesa-examples repository for all regular (non-`gis`/-`rl`) examples. Key changes include:

- Replaced `RandomActivation`, `SimultaneousActivation`, and `RandomActivationByType` schedulers with appropriate AgentSet methods
- Updated `Model.step()` implementations to use AgentSet activation
- Removed references to `schedule.steps`, `schedule.agents`, and `schedule.agents_by_type`
- Updated agent addition/removal logic to work with AgentSets
- Adjusted data collection and visualization code to use `Model.steps` and `Model.agents`

For more details on migrating from schedulers to AgentSets, see the migration guide: https://mesa.readthedocs.io/en/latest/migration_guide.html#time-and-schedulers
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

No branches or pull requests

3 participants