Comments (2)
Hi @joshcalcino, thanks for raising this issue.
Which version of Plonk are you using? You can get this by printing plonk.__version__
.
I have released a new version of Plonk (v0.5.0) today. In this version I have removed the Visualization
class in favour of a function (plonk.visualize.plot
) that returns a Matplotlib Axes object. I think this makes the code simpler, and more general. And it's easier for the user who might be already familiar with Matplotlib.
I've tested your code with v0.5.0 and it works as expected.
Also another thing I noticed in the documentation for plonk.visualize.plot, it states it returns a matplotlib axes object:
On readthedocs there are two versions: one that is pinned to the most recent release installable via pip or conda (https://plonk.readthedocs.io/en/stable/) which is called "stable" and one that is the current master branch of the development version on GitHub (https://plonk.readthedocs.io/en/latest/) that is called "latest". I think you were looking at the development version, i.e. "latest", not the "stable" one.
I am also wondering if it is possible to make the plot_object object available to the user somehow in the above object, or make it accessible some other way.
I guess now that there is no Visualization
object you can just access the required Matplotlib objects via the Axes object. (Although you could do this previously.) For example, to change the colorbar range:
ax = plonk.visualize.plot(snap=snap, quantity='density')
im = ax.images[0]
im.set_clim(vmax=1/137)
Let me know what you think.
from plonk.
Hi @joshcalcino , let me know if you have any more questions or concerns regarding this issue. If not, I'll close the issue.
from plonk.
Related Issues (20)
- Automate building the Conda and pip packages with Travis CI
- Add convenience function to generate movies HOT 6
- Add Snap method to set units to physical quantities
- Read more Phantom header quantities
- Add function to modify snaps and write a new one
- Should the 'id' array be 'particle_type'? HOT 1
- Sink particles are not rotated with `snap.rotate`
- Plot dust density for one-fluid dump HOT 2
- Incorrect temperature with phantom models with ieos=2 HOT 7
- Animation is broken HOT 1
- Creating arbitrary cross sections through SPH data HOT 4
- plonk.visualize has no attribute 'render' HOT 4
- Only the first profile in list is plotted HOT 4
- Error in Column density plots when using logarithmic colour bar. HOT 2
- Change from splash.py to sph-interp
- Add support for more Phantom equations of state
- TypeError: expected dtype object, got 'numpy.dtype[float64]' when animating HOT 7
- Shifting to the centre of the disc HOT 3
- Tracking individual particles HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plonk.