script plots#1018
Conversation
|
Definitely working better. I have a good test script that emulates the EDGE HI pipeline graphics, but it has a few failing options. Will report back after I confirm if it's a pilot error. One thing that it still reports:
|
That is a reminder to you that we don't support Spyder ;) |
I know, and my complaint about that IPython message was from a script, not via ipython. On a more "serious" note. We don't have an example script that makes an example of scripting. I do have the edge pipeline script, and I've created a "10 liner" out of this, which will run through this. The features I would recommend we have in such an example pipeline script are:
Should we add such a script to notebooks/developer, or is there another better location? |
|
As i'm using the p.show(block=True) i realized for plt.show() the default is block=True. Is there a reason why you wanted block=False to be the default? |
|
I'm not able to use the callbacks in this mode, for example
This fails because the script gets paused on the plot, where I can select the regions, but in order to get to the next step in the script ( p.s. I'm putting this down because it's a likely use case for whenever I get around to making a receiver checkout script. |
|
See PR 1034 for a potential fix idea. |
I was thinking that maybe matplotlib users will be used to calling |
|
I wrote a simple script, mimicking what the edge pipeline does: bring up two dysh plots, and bring up 2 mpl plots. They all 4 stay up, for simple interactions (pan & zoom, measure etc.) and can be killed one by one. It has the --batch option where png's are created and the script should be able run headless. It works with the current blocking-plots branch. Since this was a non-trivial thing, I think we should also "advertise" this approach. You can my final drafted script in https://github.com/teuben/dyshp/blob/main/scripts/fake_plot.py but I have a few simpler versions for mpl and dysh only in that same directory. |
teuben
left a comment
There was a problem hiding this comment.
I think it would still be nice to have block=True the default, as it is in matplotlib.
There are some strange blocking behaviors with mpl i the same script, as I've shown in my fake_plot.py script, but that may also be the peculiar way how I've written the interaction. See comments in that script, it's now a show stopper, more a feature?
This attribute is updated every time a selection is made through the iPlotter.
add regions attribute to spectrum
This attribute is updated every time a selection is made through the iPlotter.
d4de96a to
4661529
Compare
…ory/dysh into blocking-plots
Enable halting a script to bring up a plotter