Hi everyone, After talking to Sam and Devin at PiTP and then to Dave yesterday (at UCSD, my new residence) it's become clear to me that the PlotTypes and PlotCollections files -- which are remarkably unchanged over the last 2+ years of development, since they were first implemented -- have become a bit stale and have some creeping bugs. People have worked around them, but it's time for an overhaul. I'm writing with a new plan for how to handle plots, and I'm writing because it might affect some of you. The basic idea is that plots will have valid and invalid states; invalid plots will be redrawn as necessary. Additionally, Pixelization into buffers will occur only inside FixedResolutionBuffers, and every plot will have an associated FRB. So, a plot starts out, and it sets itself up and marks itself and its colorbar as invalid. We then save it, and it sees that it's invalid, so it redraws. This marks the colorbar as invalid (even though it already is), and then the colorbar gets redrawn. Both are now valid. We then change the zlim, which marks the colorbar as invalid while the image remains valid. (Colorbar and colormap are essentially inextricable here.) So far, I think it's fine -- but the question comes in during user intervention. So we have a valid state for our plot. (The user can then mess with it however they like, and on the next save, that messing with it will still be there -- because it won't be marked as invalid -- which is a huge advantage!) When we change the width of the plot, then the image becomes invalid. But my real question is, what do we do if the user then sets the zlim and then changes the width? Set zlim: invalidate colorbar Save: revalidate both Set width: invalidate image But, what happens to the colorbar? Do we invalidate it, and then reset it on next save? That is, when we change the width, does that override the user setting the colorbar? Does anyone have any thoughts? Thanks! -Matt
This sounds good in general, thanks for updating this.
But, what happens to the colorbar? Do we invalidate it, and then reset it on next save? That is, when we change the width, does that override the user setting the colorbar?
If I by hand set zlim in a plot, my intuition says it should stay set to what I intend. So if I change the width/center, I want zlim to stay what I last set it as. If there's a particular color range i'm interested, it would be confusing if it automatically changed when I moved the image a bit. d.
Does anyone have any thoughts? Thanks!
-Matt _______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
I agree with Dave on this. I'd much rather issue another command on the rare case that I want to reset the colorbar to an auto setting than to have to reset it to my hand set values each time. Now I can see where in a first star simulation (or any super-high dynamic range simulation) you would want to automatically change the colorbar as you zoom since your dynamic range in the frame will be changing. One possibility I can think of is to have a keyword in the set_width function that is perhaps "rescale_color=True/False", and the default could go either way. If True, then the zlim is reset to automatic with cmap staying constant. I'm suggesting the cmap stay constant no matter what here because I don't see a reason why someone would want to swtich back to default cmap after changing it in the first place. If rescale_color is False, then just leave everything alone. As for the default setting, perhaps this could be setup in the PlotCollection instantiation, and then no matter what the user will likely only have to issue the rescale_color keyword a single time. Anyways, those are my thoughts. I'm sure others have opposite opinions. Sam On Wed, Aug 19, 2009 at 3:36 PM, david collins <antpuncher@gmail.com> wrote:
This sounds good in general, thanks for updating this.
But, what happens to the colorbar? Do we invalidate it, and then reset it on next save? That is, when we change the width, does that override the user setting the colorbar?
If I by hand set zlim in a plot, my intuition says it should stay set to what I intend. So if I change the width/center, I want zlim to stay what I last set it as. If there's a particular color range i'm interested, it would be confusing if it automatically changed when I moved the image a bit.
d.
Does anyone have any thoughts? Thanks!
-Matt _______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
-- Samuel W. Skillman Graduate Research Assistant Center for Astrophysics and Space Astronomy University of Colorado at Boulder samuel.skillman[at]colorado.edu
Hi guys, Okay, I'm on board with this. I'll have it autoscaled until reset, at which point it'll stay reset unless autoscale comes back on. I've checked in a couple initial steps in this direction, but I ended up having other things come up and then worked a bit on time-series analysis (another email.) I am hoping to have the refactoring and backend reorganization of the plots done by the end of the weekend. You can see the progress, as always, in the hg repo. The branch is named plotting-refactor. -Matt On Wed, Aug 19, 2009 at 2:56 PM, Sam Skillman<72Nova@gmail.com> wrote:
I agree with Dave on this. I'd much rather issue another command on the rare case that I want to reset the colorbar to an auto setting than to have to reset it to my hand set values each time. Now I can see where in a first star simulation (or any super-high dynamic range simulation) you would want to automatically change the colorbar as you zoom since your dynamic range in the frame will be changing. One possibility I can think of is to have a keyword in the set_width function that is perhaps "rescale_color=True/False", and the default could go either way. If True, then the zlim is reset to automatic with cmap staying constant. I'm suggesting the cmap stay constant no matter what here because I don't see a reason why someone would want to swtich back to default cmap after changing it in the first place. If rescale_color is False, then just leave everything alone. As for the default setting, perhaps this could be setup in the PlotCollection instantiation, and then no matter what the user will likely only have to issue the rescale_color keyword a single time. Anyways, those are my thoughts. I'm sure others have opposite opinions. Sam On Wed, Aug 19, 2009 at 3:36 PM, david collins <antpuncher@gmail.com> wrote:
This sounds good in general, thanks for updating this.
But, what happens to the colorbar? Do we invalidate it, and then reset it on next save? That is, when we change the width, does that override the user setting the colorbar?
If I by hand set zlim in a plot, my intuition says it should stay set to what I intend. So if I change the width/center, I want zlim to stay what I last set it as. If there's a particular color range i'm interested, it would be confusing if it automatically changed when I moved the image a bit.
d.
Does anyone have any thoughts? Thanks!
-Matt _______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
-- Samuel W. Skillman Graduate Research Assistant Center for Astrophysics and Space Astronomy University of Colorado at Boulder samuel.skillman[at]colorado.edu
_______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
participants (3)
-
david collins
-
Matthew Turk
-
Sam Skillman