From: Benoit Donnet <benoit.donnet@uc...>  20070703 08:13:32
Attachments:
Surveyors.jpg
Message as HTML

Hey guys, I'm trying to plot quantiles information (percentile 10, 25, 50, 75 and 90). Attached, you'll find a jpged of what I would like to do (this was done using Gnuplot): the vertical line delineates the range from the 10th to the 90th percentile. Small tick bars to either side of the lines mark some additional percentiles: bar to the left for the 25th and bar to the right for the 75th. Finally, dots mark the median. I attempted to use matplotlib.finance modules. In particular, the candlestick stuffs are quite close to what I want. But it didn't work as the XAxis does not correspond to a date information (XAxis values are within the range [1:1780]). Have you got an idea on how I can plot that using matplotlib? Thanks in advance. Keep on rockin' Benoit 
From: Jeff Whitaker <jswhit@fa...>  20070703 17:52:21

Benoit Donnet wrote: > Hey guys, > > I'm trying to plot quantiles information (percentile 10, 25, 50, 75 > and 90). Attached, you'll find a jpged of what I would like to do > (this was done using Gnuplot): the vertical line delineates the range > from the 10th to the 90th percentile. Small tick bars to either side > of the lines mark some additional percentiles: bar to the left for the > 25th and bar to the right for the 75th. Finally, dots mark the median. > > I attempted to use matplotlib.finance modules. In particular, the > candlestick stuffs are quite close to what I want. But it didn't work > as the XAxis does not correspond to a date information (XAxis values > are within the range [1:1780]). > > Have you got an idea on how I can plot that using matplotlib? > > Thanks in advance. > > Keep on rockin' > > Benoit > Benoit: This looks very similar to what the boxplot function does (see http://matplotlib.sourceforge.net/matplotlib.pylab.html#boxplot and boxplot_demo.py). If you want to tweak it, the boxplot function in axes.py might be a good starting point. Jeff  Jeffrey S. Whitaker Phone : (303)4976313 Meteorologist FAX : (303)4976449 NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@... 325 Broadway Office : Skaggs Research Cntr 1D124 Boulder, CO, USA 803033328 Web : http://tinyurl.com/5telg 
From: Benoit Donnet <Benoit.D<onnet@uc...>  20070704 12:03:40

Thanks for the advice, Jeff. That's really what I was looking for. I still have another question (I'm sorry for that). Is it possible =20 to increase the linewidth of the box plot (and change the color  =20 i.e., from blue to black)? In the documentation, I don't see any =20 option for boxplot regarding that point (the "widths" option refers =20 to the width of the box, not the line). I agree it is a cosmetic question but I think it would be better in a =20= paper if I can change the linewidth and color. Thanks in advance. Keep on rockin' Benoit Le 03juil.07 =E0 19:52, Jeff Whitaker a =E9crit : > Benoit Donnet wrote: >> Hey guys, >> >> I'm trying to plot quantiles information (percentile 10, 25, 50, =20 >> 75 and 90). Attached, you'll find a jpged of what I would like to =20= >> do (this was done using Gnuplot): the vertical line delineates the =20= >> range from the 10th to the 90th percentile. Small tick bars to =20 >> either side of the lines mark some additional percentiles: bar to =20 >> the left for the 25th and bar to the right for the 75th. Finally, =20= >> dots mark the median. >> >> I attempted to use matplotlib.finance modules. In particular, the =20= >> candlestick stuffs are quite close to what I want. But it didn't =20 >> work as the XAxis does not correspond to a date information (X=20 >> Axis values are within the range [1:1780]). >> >> Have you got an idea on how I can plot that using matplotlib? >> >> Thanks in advance. >> >> Keep on rockin' >> >> Benoit >> > > Benoit: This looks very similar to what the boxplot function does =20 > (see http://matplotlib.sourceforge.net/matplotlib.pylab.html#=20 > boxplot and boxplot_demo.py). If you want to tweak it, the boxplot =20= > function in axes.py might be a good starting point. > > Jeff > > =20 > Jeffrey S. Whitaker Phone : (303)4976313 > Meteorologist FAX : (303)4976449 > NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@... > 325 Broadway Office : Skaggs Research Cntr 1D124 > Boulder, CO, USA 803033328 Web : http://tinyurl.com/5telg >  Dr. Benoit Donnet Universit=E9 Catholique de Louvain (UCL) Facult=E9 des Sciences Appliqu=E9es  D=E9partement d'Ing=E9nierie =20 Informatique (INGI) Place Sainte Barbe, 2 1348 LouvainlaNeuve Belgium Phone: +32 10 47 87 18 Home page: http://inl.info.ucl.ac.be/donnet 
From: Benoit Donnet <benoit.donnet@uc...>  20070704 13:52:41

Guys, > Is it possible > to increase the linewidth of the box plot (and change the color  > i.e., from blue to black)? In the documentation, I don't see any > option for boxplot regarding that point (the "widths" option refers > to the width of the box, not the line). Looking in the matplotlibdevel mailinglist, I found a brand new =20 version of the boxplot method (written by Rob Clewley). This method =20 allows me to have a monochrome plot. This is quite better. I then modified Rob's code for getting linewidth (that's 100% hacking =20=  I'm not proud of it). Sorry for the disturbance. Benoit > I agree it is a cosmetic question but I think it would be better in a > paper if I can change the linewidth and color. > > Thanks in advance. > > Keep on rockin' > > Benoit > > Le 03juil.07 =E0 19:52, Jeff Whitaker a =E9crit : > >> Benoit Donnet wrote: >>> Hey guys, >>> >>> I'm trying to plot quantiles information (percentile 10, 25, 50, >>> 75 and 90). Attached, you'll find a jpged of what I would like to >>> do (this was done using Gnuplot): the vertical line delineates the >>> range from the 10th to the 90th percentile. Small tick bars to >>> either side of the lines mark some additional percentiles: bar to >>> the left for the 25th and bar to the right for the 75th. Finally, >>> dots mark the median. >>> >>> I attempted to use matplotlib.finance modules. In particular, the >>> candlestick stuffs are quite close to what I want. But it didn't >>> work as the XAxis does not correspond to a date information (X >>> Axis values are within the range [1:1780]). >>> >>> Have you got an idea on how I can plot that using matplotlib? >>> >>> Thanks in advance. >>> >>> Keep on rockin' >>> >>> Benoit >>> >> >> Benoit: This looks very similar to what the boxplot function does >> (see http://matplotlib.sourceforge.net/matplotlib.pylab.html# >> boxplot and boxplot_demo.py). If you want to tweak it, the boxplot >> function in axes.py might be a good starting point. >> >> Jeff >> >> =20 >> Jeffrey S. Whitaker Phone : (303)4976313 >> Meteorologist FAX : (303)4976449 >> NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@... >> 325 Broadway Office : Skaggs Research Cntr 1D124 >> Boulder, CO, USA 803033328 Web : http://tinyurl.com/5telg >> > >  > Dr. Benoit Donnet > Universit=E9 Catholique de Louvain (UCL) > Facult=E9 des Sciences Appliqu=E9es  D=E9partement d'Ing=E9nierie > Informatique (INGI) > Place Sainte Barbe, 2 > 1348 LouvainlaNeuve > Belgium > Phone: +32 10 47 87 18 > Home page: http://inl.info.ucl.ac.be/donnet > > > > > =20= >  > This SF.net email is sponsored by DB2 Express > Download DB2 Express C  the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers  Dr. Benoit Donnet Universit=E9 Catholique de Louvain (UCL) Facult=E9 des Sciences Appliqu=E9es  D=E9partement d'Ing=E9nierie =20 Informatique (INGI) Place Sainte Barbe, 2 1348 LouvainlaNeuve Belgium Phone: +32 10 47 87 18 Home page: http://inl.info.ucl.ac.be/donnet 
From: Eric Firing <efiring@ha...>  20070704 17:45:53

Benoit, Thanks for pointing this out. I am not a boxplotuser, but a quick look together with your post and Rob's suggests to me that some version of Rob's enhancements should be committed to svn. I think it might be possible to simplify the argument list; a bit of code review would be good. Regarding your modification of linewidth, do you think this really needs to be yet another kwarg, or is it adequate to be able to adjust the linewidth with a line of user code after calling boxplot? The method returns a dictionary with the various lists of line objects that have been drawn, so any properties of those objects can be altered. Perhaps a more thorough updating of boxplot would use collections instead of lists of lines. Any volunteers? I am not going to do it. This would speed it up for cases with many points, but maybe boxplot is normally used with few enough points that this doesn't matter. Eric Benoit Donnet wrote: > Guys, > >> Is it possible >> to increase the linewidth of the box plot (and change the color  >> i.e., from blue to black)? In the documentation, I don't see any >> option for boxplot regarding that point (the "widths" option refers >> to the width of the box, not the line). > > Looking in the matplotlibdevel mailinglist, I found a brand new > version of the boxplot method (written by Rob Clewley). This method > allows me to have a monochrome plot. This is quite better. > > I then modified Rob's code for getting linewidth (that's 100% hacking >  I'm not proud of it). > > Sorry for the disturbance. > > Benoit > >> I agree it is a cosmetic question but I think it would be better in a >> paper if I can change the linewidth and color. >> >> Thanks in advance. >> >> Keep on rockin' >> >> Benoit >> >> Le 03juil.07 à 19:52, Jeff Whitaker a écrit : >> >>> Benoit Donnet wrote: >>>> Hey guys, >>>> >>>> I'm trying to plot quantiles information (percentile 10, 25, 50, >>>> 75 and 90). Attached, you'll find a jpged of what I would like to >>>> do (this was done using Gnuplot): the vertical line delineates the >>>> range from the 10th to the 90th percentile. Small tick bars to >>>> either side of the lines mark some additional percentiles: bar to >>>> the left for the 25th and bar to the right for the 75th. Finally, >>>> dots mark the median. >>>> >>>> I attempted to use matplotlib.finance modules. In particular, the >>>> candlestick stuffs are quite close to what I want. But it didn't >>>> work as the XAxis does not correspond to a date information (X >>>> Axis values are within the range [1:1780]). >>>> >>>> Have you got an idea on how I can plot that using matplotlib? >>>> >>>> Thanks in advance. >>>> >>>> Keep on rockin' >>>> >>>> Benoit >>>> >>> Benoit: This looks very similar to what the boxplot function does >>> (see http://matplotlib.sourceforge.net/matplotlib.pylab.html# >>> boxplot and boxplot_demo.py). If you want to tweak it, the boxplot >>> function in axes.py might be a good starting point. >>> >>> Jeff >>> >>>  >>> Jeffrey S. Whitaker Phone : (303)4976313 >>> Meteorologist FAX : (303)4976449 >>> NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@... >>> 325 Broadway Office : Skaggs Research Cntr 1D124 >>> Boulder, CO, USA 803033328 Web : http://tinyurl.com/5telg >>> >>  >> Dr. Benoit Donnet >> Université Catholique de Louvain (UCL) >> Faculté des Sciences Appliquées  Département d'Ingénierie >> Informatique (INGI) >> Place Sainte Barbe, 2 >> 1348 LouvainlaNeuve >> Belgium >> Phone: +32 10 47 87 18 >> Home page: http://inl.info.ucl.ac.be/donnet >> >> >> >> >>  >>  >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C  the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Matplotlibusers mailing list >> Matplotlibusers@... >> https://lists.sourceforge.net/lists/listinfo/matplotlibusers > >  > Dr. Benoit Donnet > Université Catholique de Louvain (UCL) > Faculté des Sciences Appliquées  Département d'Ingénierie > Informatique (INGI) > Place Sainte Barbe, 2 > 1348 LouvainlaNeuve > Belgium > Phone: +32 10 47 87 18 > Home page: http://inl.info.ucl.ac.be/donnet > > > > >  > This SF.net email is sponsored by DB2 Express > Download DB2 Express C  the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers 
From: Benoit Donnet <Benoit.D<onnet@uc...>  20070705 07:53:22

Eric, > Regarding your modification of linewidth, do you think this really =20 > needs to be yet another kwarg, That's what I did (I'm not a Python expert). IMHO, this is more =20 consistent with the existing methods (such as plot() or errorbar() ). > or is it adequate to be able to adjust the linewidth with a line of =20= > user code after calling boxplot? The method returns a dictionary =20 > with the various lists of line objects that have been drawn, so any =20= > properties of those objects can be altered. I didn't think to change properties of returned objects Benoit > > Perhaps a more thorough updating of boxplot would use collections =20 > instead of lists of lines. Any volunteers? I am not going to do =20 > it. This would speed it up for cases with many points, but maybe =20 > boxplot is normally used with few enough points that this doesn't =20 > matter. > > Eric > > Benoit Donnet wrote: >> Guys, >>> Is it possible >>> to increase the linewidth of the box plot (and change the color  >>> i.e., from blue to black)? In the documentation, I don't see any >>> option for boxplot regarding that point (the "widths" option refers >>> to the width of the box, not the line). >> Looking in the matplotlibdevel mailinglist, I found a brand new =20= >> version of the boxplot method (written by Rob Clewley). This =20 >> method allows me to have a monochrome plot. This is quite better. >> I then modified Rob's code for getting linewidth (that's 100% =20 >> hacking  I'm not proud of it). >> Sorry for the disturbance. >> Benoit >>> I agree it is a cosmetic question but I think it would be better =20 >>> in a >>> paper if I can change the linewidth and color. >>> >>> Thanks in advance. >>> >>> Keep on rockin' >>> >>> Benoit >>> >>> Le 03juil.07 =E0 19:52, Jeff Whitaker a =E9crit : >>> >>>> Benoit Donnet wrote: >>>>> Hey guys, >>>>> >>>>> I'm trying to plot quantiles information (percentile 10, 25, 50, >>>>> 75 and 90). Attached, you'll find a jpged of what I would like to >>>>> do (this was done using Gnuplot): the vertical line delineates the >>>>> range from the 10th to the 90th percentile. Small tick bars to >>>>> either side of the lines mark some additional percentiles: bar to >>>>> the left for the 25th and bar to the right for the 75th. Finally, >>>>> dots mark the median. >>>>> >>>>> I attempted to use matplotlib.finance modules. In particular, the >>>>> candlestick stuffs are quite close to what I want. But it didn't >>>>> work as the XAxis does not correspond to a date information (X >>>>> Axis values are within the range [1:1780]). >>>>> >>>>> Have you got an idea on how I can plot that using matplotlib? >>>>> >>>>> Thanks in advance. >>>>> >>>>> Keep on rockin' >>>>> >>>>> Benoit >>>>> >>>> Benoit: This looks very similar to what the boxplot function does >>>> (see http://matplotlib.sourceforge.net/matplotlib.pylab.html# >>>> boxplot and boxplot_demo.py). If you want to tweak it, the boxplot >>>> function in axes.py might be a good starting point. >>>> >>>> Jeff >>>> >>>> =20 >>>> Jeffrey S. Whitaker Phone : (303)4976313 >>>> Meteorologist FAX : (303)4976449 >>>> NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@... >>>> 325 Broadway Office : Skaggs Research Cntr 1D124 >>>> Boulder, CO, USA 803033328 Web : http://tinyurl.com/5telg >>>> >>>  >>> Dr. Benoit Donnet >>> Universit=E9 Catholique de Louvain (UCL) >>> Facult=E9 des Sciences Appliqu=E9es  D=E9partement d'Ing=E9nierie >>> Informatique (INGI) >>> Place Sainte Barbe, 2 >>> 1348 LouvainlaNeuve >>> Belgium >>> Phone: +32 10 47 87 18 >>> Home page: http://inl.info.ucl.ac.be/donnet >>> >>> >>> >>> >>> =20= >>>   >>> This SF.net email is sponsored by DB2 Express >>> Download DB2 Express C  the FREE version of DB2 express and take >>> control of your XML. No limits. Just data. Click to get it now. >>> http://sourceforge.net/powerbar/db2/ >>> _______________________________________________ >>> Matplotlibusers mailing list >>> Matplotlibusers@... >>> https://lists.sourceforge.net/lists/listinfo/matplotlibusers >>  >> Dr. Benoit Donnet >> Universit=E9 Catholique de Louvain (UCL) >> Facult=E9 des Sciences Appliqu=E9es  D=E9partement d'Ing=E9nierie =20= >> Informatique (INGI) >> Place Sainte Barbe, 2 >> 1348 LouvainlaNeuve >> Belgium >> Phone: +32 10 47 87 18 >> Home page: http://inl.info.ucl.ac.be/donnet >> =20= >>  >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C  the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Matplotlibusers mailing list >> Matplotlibusers@... >> https://lists.sourceforge.net/lists/listinfo/matplotlibusers >  Dr. Benoit Donnet Universit=E9 Catholique de Louvain (UCL) Facult=E9 des Sciences Appliqu=E9es  D=E9partement d'Ing=E9nierie =20 Informatique (INGI) Place Sainte Barbe, 2 1348 LouvainlaNeuve Belgium Phone: +32 10 47 87 18 Home page: http://inl.info.ucl.ac.be/donnet 