Michael Haggerty wrote:
> I just implemented some accumulated suggestions in the CVS version of
> Fernando Perez wrote:
>>>Some quick comments regarding your specific ideas:
>>> > -plot(y) -> plot a NumPy array against its indices
>>> > -plot(x,y) -> plot y vs x
> I will not implement this (because of the ambiguity). But since this
> seems to be a popular feature, maybe I'll implement it with another name
> (like 'qplot()', as suggested by Leo Milano).
Fair enough. I agree that it's ambiguous. I did it simply because _I_ use it
a lot, and I know how to handle it. But for a general public tool, it's much
cleaner to have a different function. However, qplot() should keep the same
interface as plot() in regards to options, etc.
>>> > -plot(y1,None,y2) -> plot y1,y2 vs their indices (None is a
>>> > -plot(y,filename='out.eps') -> make eps output reliably
>>> > (there's a tricky timing issue which requires
>>> > retrying the print command with a sleep())
> I still don't understand the timing issue. But I see the need to be
> able to plot directly to a "hardcopy" file (be it PS or EPS or PNG or
> ...) without first plotting to a graphics window. It would be very
> nearly possible now, if Gnuplot._add_to_queue() were a documented part
> of the interface.
Agreed on the auto-plotting to file without plotting window. This was
critical to me, but I only implemented eps output.
Re. the timing issue: honestly, I don't understand it either. I only know I
wasted an entire Saturday trying to find any pattern to it, and finally
decided to brute-force a solution with the 20 tries approach. Inelegant as
hell, but so far it's done the job for me ;)
>>> > - Added the 'index' keyword arg to File, similar to Gnuplot's
>>> > index option to select a dataset from a file with multiple
>>> > datasets in it.
As far as I can see, you've pretty much brought into the Gnuplot.py mainline
almost everything which IPython's gnuplot support added. This is great news,
since I didn't want to fork your code, but simply offer functionality which I
felt was needed for daily work.
Once you make a release (hopefully with hardcopy-without-window in, which I
consider critical), perhaps we can comb over what's left and I could deprecate
IPython's gnuplot stuff in favor of your mainline code.