plot_date inconsistency

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

plot_date inconsistency

Alan G Isaac
Unlike 'plot', 'plot_date' does not completely honor
the linestyle specification if given in a dictionary.
Try this:

import pylab
l=dict(linestyle='-')
pylab.plot_date([100000,200000,300000],[1,2,3],**l)

You will see points as well as lines plotted.
I suspect a small bug here?

Thanks,
Alan Isaac
using 0.83.2




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: plot_date inconsistency

John Hunter-8
>>>>> "Alan" == Alan G Isaac <[hidden email]> writes:

    Alan> Unlike 'plot', 'plot_date' does not completely honor the
    Alan> linestyle specification if given in a dictionary.  Try this:

    Alan> import pylab l=dict(linestyle='-')
    Alan> pylab.plot_date([100000,200000,300000],[1,2,3],**l)

    Alan> You will see points as well as lines plotted.  I suspect a
    Alan> small bug here?

There is a slight inconsistency in that plot_date and plot have
different default behavior, you can control the plot_date marker with
the dictionary; note that the linestyle and marker are independent
line properties.

    # use no marker
    l=dict(linestyle='-', marker=None)

    # use a square marker
    l=dict(linestyle='-', marker='s')

JDH


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re[2]: plot_date inconsistency

Alan G Isaac
On Thu, 01 Sep 2005, John Hunter apparently wrote:
>     # use no marker
>     l=dict(linestyle='-', marker=None)

That reminds me:
the pylab docs refer several times to 'plot' for
the kwargs, but these are not listed by the plot
docs.  It would be nice if the plot docs said

        A list of kwargs can be obtained using `setp`.

Or something to that effect.  (In fact, this might also be
better language than referring to plot as the docs do
elsewhere?  E.g., in plot_data.)

fwiw,
Alan Isaac





-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: plot_date inconsistency

John Hunter-8
>>>>> "Alan" == Alan G Isaac <[hidden email]> writes:

    Alan> That reminds me: the pylab docs refer several times to
    Alan> 'plot' for the kwargs, but these are not listed by the plot
    Alan> docs.  It would be nice if the plot docs said

If you could send a docstring patch, that would be great.

JDH


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: plot_date inconsistency

Alan G Isaac
On Fri, 02 Sep 2005, John Hunter wrote:
> If you could send a docstring patch, that would be great.

I was going to but I looked in pylab.py and found a note
that the plot function def and docs were automatically
generated, so I did not know what file to patch.  (Sorry;
I'm new to this kind of thing.)

Cheers,
Alan Isaac




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: plot_date inconsistency

John Hunter-8
>>>>> "Alan" == Alan Isaac <[hidden email]> writes:

    Alan> On Fri, 02 Sep 2005, John Hunter wrote:
    >> If you could send a docstring patch, that would be great.

    Alan> I was going to but I looked in pylab.py and found a note
    Alan> that the plot function def and docs were automatically
    Alan> generated, so I did not know what file to patch.  (Sorry;
    Alan> I'm new to this kind of thing.)

No problem.

pylab.py is for the most part a thin wrapper of functionality of
axes.py.  Eg, pylab.plot calls ax.plot and pylab.imshow calls
ax.imshow.  So if you find a problem with a pylab docstring, you can
usually find the original function in axes.py and fix that.

If you are on a win32 platform, which I think wyou are, you can install
ming32 and run a diff command like the one suggested by Charles Moad
at

  http://sourceforge.net/mailarchive/message.php?msg_id=12793726

If you are not comfortable with cvs/patch/diff, that's fine.  Just
edit the files in question and send them to me as an attachment and I
can deal with them.  

Thanks,
JDH


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users