You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
1
(20) |
2
(16) |
3
(9) |
4
(12) |
5
(14) |
6
(22) |
7
(17) |
8
(33) |
9
(26) |
10
(32) |
11
(47) |
12
(26) |
13
(7) |
14
(24) |
15
(44) |
16
(42) |
17
(22) |
18
(31) |
19
(8) |
20
(4) |
21
(15) |
22
(27) |
23
(41) |
24
(33) |
25
(31) |
26
(24) |
27
(10) |
28
(20) |
|
|
|
|
|
|
Tom Leys wrote: > > It looks like you are storing your source data in a python list. > Matplotlib runs much faster if you store your data using a numpy array > instead. > > I'm no expert, but it certianly sped up my graph drawing. > I am trying something similar to what Mike was describing. I have converted all of the stored data to numpy arrays rather than python lists, as per your suggestion. But the plots I'm making don't have more than 50 entries apiece, and I'm not seeing any appreciable speed-up. It still takes ~15 seconds to produce each plot (using PDF backend to save to files). Does anybody have other thoughts on what I might be able to try to bring the lag down to something more reasonable? My use case is that I'm building a library to dump the content of histograms from ROOT (a data analysis package used in physics) into a convenient Hist object that has members to directly plot the data as a matplotlib errorbar or bar plot. You can see the 100 lines I've written here: http://www.hep.wisc.edu/~jklukas/public/root2matplot.py I've tried running a profiler like Mike did, but I'm afraid I'm not able to parse any useful information from it either. I'd appreciate any advice from the community. Thanks, Jeff Output of profiler for producing one single plot: ---------------------------------------------------- Wed Feb 24 15:01:20 2010 timing 6995086 function calls (6983887 primitive calls) in 22.301 CPU seconds Ordered by: cumulative time List reduced from 1080 to 25 due to restriction <25> ncalls tottime percall cumtime percall filename:lineno(function) 1 0.004 0.004 22.301 22.301 ../overlayHists.py:367(main) 20/1 0.139 0.007 21.669 21.669 ../overlayHists.py:123(process_directory) 1 0.001 0.001 21.529 21.529 ../overlayHists.py:231(process_hist_matplotlib) 2 0.000 0.000 21.384 10.692 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/pyplot.py:354(savefig) 2 0.000 0.000 21.384 10.692 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/figure.py:959(savefig) 2 0.000 0.000 21.384 10.692 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/backend_bases.py:1372(print_figure) 2 0.000 0.000 21.373 10.687 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/backends/backend_pdf.py:2012(print_pdf) 126/2 0.001 0.000 12.314 6.157 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/artist.py:44(draw_wrapper) 2 0.000 0.000 12.314 6.157 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/figure.py:729(draw) 2 0.000 0.000 12.310 6.155 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/axes.py:1632(draw) 4 0.002 0.000 11.940 2.985 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/axis.py:727(draw) 40 0.005 0.000 11.927 0.298 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/text.py:504(draw) 58 0.023 0.000 10.349 0.178 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/dviread.py:805(find_tex_file) 58 0.008 0.000 9.904 0.171 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/subprocess.py:662(communicate) 15059 9.899 0.001 9.899 0.001 {method 'read' of 'file' objects} 2 0.000 0.000 9.051 4.526 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/backends/backend_pdf.py:447(close) 2 0.001 0.001 9.043 4.521 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/backends/backend_pdf.py:520(writeFonts) 8 0.008 0.001 9.041 1.130 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/backends/backend_pdf.py:554(embedTeXFont) 8 0.000 0.000 8.637 1.080 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/type1font.py:47(__init__) 304 0.001 0.000 7.796 0.026 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/dviread.py:50(__iter__) 157/152 0.017 0.000 7.780 0.051 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/dviread.py:114(_read) 5788/3854 0.025 0.000 7.765 0.002 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/dviread.py:146(_dispatch) 116 0.004 0.000 7.751 0.067 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/backends/backend_pdf.py:1643(get_text_width_height_descent) 116 0.002 0.000 7.711 0.066 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/texmanager.py:576(get_text_width_height_descent) 82 0.007 0.000 7.690 0.094 /Library/Frameworks/Python.framework/Versions/6.0.4/lib/python2.6/site-packages/matplotlib/text.py:250(_get_layout) -- View this message in context: http://old.nabble.com/matplotlib-slow-compared-to-gnuplot--tp26302608p27714298.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Hello, I'm also interested in getting this done and started playing with the classes in offsetbox.py. I'll post if I get something working. The only way I can think of achieving the 'dropdown' effect is by changing the 'visible' property on the children. Is this the way to do it? Any better suggestions? Thanks, Nadia John Hunter wrote: > On Mon, Feb 22, 2010 at 4:26 AM, Wolfgang Kerzendorf > <wke...@ms...> wrote: >> Hello, >> >> Now that I have found the awesome widgets in matplotlib I want more: dropdown menus? will that come at some stage? > > I have worked on it, but not finished it. I put the code in svn under examples > > http://matplotlib.sourceforge.net/examples/widgets/menu.html > > but it would be migrated to matplotlib.widgets once it is completed. > If you or someone else wants to run with it, that would be great. It > would be handy to have this functionality. > > I wrote this before JJ provided his nice containers in offsetbox, and > it should probably be reworked to use the OffsetbOX > > JDH > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Angus McMorland wrote: > On 24 February 2010 13:36, AG <com...@go...> wrote: > >> Hi >> >> How do I set up my matplotlib.pyplot code so that the data for the >> x-axis is plotted beginning at 1 not the default 0. To illustrate: >> >> I have a set of time trials and error probability calculations. Trials >> are x and scores are y. At present, the first trial is plotted on the >> graph at 0 which is illogical. I admit that I'm not sure exactly what I >> am looking for, but I can't see this mentioned in the docs. I just want >> the plot to begin at trial 1, not the 0; however, I don't mind if the >> x-axis has a 0 scale on it, but trials don't begin at a 0 trial, so how >> do I get around this. >> >> I've listed the basic code below: >> >> plt.plot( scores ) >> plt.ylabel( "Scores" ) >> plt.xlabel( "Trials" ) >> plt.show() >> > > You can explicitly specify x-axis values: > > x = np.arange(len(scores)) + 1 > plt.plot(x, scores) > > HTH, > > Angus. > Hi Angus Thanks for the quick reply. Once I imported numpy as np and re-ran the program that did the trick perfectly. Many thanks!! All the best AG
On 24 February 2010 13:36, AG <com...@go...> wrote: > Hi > > How do I set up my matplotlib.pyplot code so that the data for the > x-axis is plotted beginning at 1 not the default 0. To illustrate: > > I have a set of time trials and error probability calculations. Trials > are x and scores are y. At present, the first trial is plotted on the > graph at 0 which is illogical. I admit that I'm not sure exactly what I > am looking for, but I can't see this mentioned in the docs. I just want > the plot to begin at trial 1, not the 0; however, I don't mind if the > x-axis has a 0 scale on it, but trials don't begin at a 0 trial, so how > do I get around this. > > I've listed the basic code below: > > plt.plot( scores ) > plt.ylabel( "Scores" ) > plt.xlabel( "Trials" ) > plt.show() You can explicitly specify x-axis values: x = np.arange(len(scores)) + 1 plt.plot(x, scores) HTH, Angus. -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh
Hi How do I set up my matplotlib.pyplot code so that the data for the x-axis is plotted beginning at 1 not the default 0. To illustrate: I have a set of time trials and error probability calculations. Trials are x and scores are y. At present, the first trial is plotted on the graph at 0 which is illogical. I admit that I'm not sure exactly what I am looking for, but I can't see this mentioned in the docs. I just want the plot to begin at trial 1, not the 0; however, I don't mind if the x-axis has a 0 scale on it, but trials don't begin at a 0 trial, so how do I get around this. I've listed the basic code below: plt.plot( scores ) plt.ylabel( "Scores" ) plt.xlabel( "Trials" ) plt.show() TIA AG
C M wrote: > On Wed, Feb 24, 2010 at 11:51 AM, AG <com...@go...> wrote: > >> How does one ensure that once a graph has been produced by Matplotlib >> and that graph has been closed by the user that the program itself stops? >> >> What I am currently getting is that when I close the graph pop-up window >> and then close IDLE, I get a message that the program is still running >> and am I sure that I want to stop it. Yes, I am sure, but I don't want >> to have to keep killing the IDLE interpreter window in order to do so, >> but if I don't, then I am seemingly unable to produce another graph >> pop-up window. >> >> How do I control this from within the script itself? I am using Debian >> testing with Python 2.5.5 >> > > IDLE just doesn't work well with matplotlib (or GUI apps), as has been > recently discussed here (if you Google for matplotlib and IDLE you'll > find lots of posts about it). You could use ipython instead, and now > there is also DreamPie (http://dreampie.sourceforge.net/), a new IDE > which claims to play well with matplotlib. Those who embed their > matplotlib plots in a GUI app also don't face this concern. > > Che > > Thanks Che. Have downloaded/ installed dreampie and am giving it a whirl. Haven't figured out how to load pre-written scripts and the docs are pretty near non-existent, but with enough experimentation I'm sure I'll get there. Cheers AG
I looked at the examples online and have searched the newsgroup and am stuck. I figured out how to place the table on the right hand side but now I would like to have the table display as follows: colors for headding date clear Left in blue right in red date Left Right 1.1.2001 4 5.5 1.1.2003 03 3.5 etc..... The attached code should be fully runable so you can see what it is doing and what I am trying to do Thank you duckman #!/usr/bin/python import matplotlib import numpy as np import matplotlib.pyplot as plt import matplotlib.mlab as mlab import matplotlib.ticker as ticker from pylab import * from matplotlib.colors import colorConverter axes([0.03, 0.2, 0.9, 0.7]) data = [[4,03,11,11.1,12.5,12.9,11.1,11,11.3,21,13.4,12,21,21,11,15.55,12,22,22,11.1,14,17,13,12,13,10,16.0,14.5,12,12,12,12,12,12,13,13,14,14,13,13,14,14,14,14,12,12,13], [5.5,03.5,11.11,11.2,13.9,19.3,11.1,41,12.3,22.0,12.8,13,30,21.5,31,17.05,15,23,33,11.2,15,18,13,13,11,18.2,21,19.5,16,16,13,13,13,13,14,14,14,14,14,14,14,14,15,15,12,12,14]] title('Hop History for John doe \n 02.20.2010') locs, colLabels = xticks([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], ['01.01.2001', '01.01.2003', '08.01.2004', '03.03.2007', '06.08.2007', '06.12.2007', '01.01.2008', '02.25.2008', '04.04.2008', '05.27.2008', '05.27.2008', '05.27.2008', '05.27.2008', '05.27.2008', '05.30.2008', '06.01.2008', '06.11.2008', '06.11.2008', '06.19.2008', '06.19.2008', '06.19.2008', '07.10.2008', '07.10.2008', '07.10.2008', '07.10.2008', '07.18.2008', '07.22.2008', '07.22.2008', '01.27.2009', '01.27.2009', '02.24.2009', '02.24.2009', '02.24.2009', '02.24.2009', '05.19.2009', '05.19.2009', '05.19.2009', '05.19.2009', '06.05.2009', '06.05.2009', '06.05.2009', '06.05.2009', '06.29.2009', '06.29.2009', '08.28.2009', '08.28.2009', '11.23.2009']) rowLabels = ('Right', 'Left') linecolor = ('#3300ff','#ff0000') vals = arange(1, 43, 2) rows = len(data) ind = arange(len(colLabels)) cellText = [] #for row in xrange(rows): # coff = colLabels[row] # cellText.append(['%1.2f' % (x) for x in coff]) for row in xrange(rows): plot(arange(0,47), data[row], '.-', color=linecolor[row]) yoff = data[row] cellText.append(['%1.0f' % (x) for x in yoff]) yticks(vals, ['%d' % val for val in vals]) setp(colLabels, 'rotation', '90') legend(('Right','Left')) the_table = table(cellText=cellText, cellLoc='right', rowLabels=rowLabels, rowColours=linecolor, rowLoc='left', colLabels=colLabels, colLoc='right', loc='right') savefig("/var/www/html/mfx/419/graph.png",dpi=(1024/4)) -- View this message in context: http://old.nabble.com/table-on-right-and-rotating-the-table-entries-tp27714264p27714264.html Sent from the matplotlib - users mailing list archive at Nabble.com.
On Wed, Feb 24, 2010 at 11:51 AM, AG <com...@go...> wrote: > How does one ensure that once a graph has been produced by Matplotlib > and that graph has been closed by the user that the program itself stops? > > What I am currently getting is that when I close the graph pop-up window > and then close IDLE, I get a message that the program is still running > and am I sure that I want to stop it. Yes, I am sure, but I don't want > to have to keep killing the IDLE interpreter window in order to do so, > but if I don't, then I am seemingly unable to produce another graph > pop-up window. > > How do I control this from within the script itself? I am using Debian > testing with Python 2.5.5 IDLE just doesn't work well with matplotlib (or GUI apps), as has been recently discussed here (if you Google for matplotlib and IDLE you'll find lots of posts about it). You could use ipython instead, and now there is also DreamPie (http://dreampie.sourceforge.net/), a new IDE which claims to play well with matplotlib. Those who embed their matplotlib plots in a GUI app also don't face this concern. Che
Probably this change would upset John Tukey if he were alive. I still wonder how you ignore the data since boxplot is there to represent the data :) Tell me how to undiff the changes then I will test your idea. On Wed, Feb 24, 2010 at 12:03 AM, Ariel Rokem <ar...@be...> wrote: > No - not the 'widths' kwarg. I want something that *looks* like the > boxplot, but for which I will have control of setting the ranges delimited > by the box and delimited by the whiskers (in the vertical dimension, not the > horizontal dimension). I resorted to hacking something from the existing > code (see attached diff). This simply allows you to over-ride the > computation of box_y, med_y and the wisk_lo and wisk_hi, which are otherwise > derived from the data. In other words, it allows you to ignore the data :-) > > Cheers - Ariel > > > On Tue, Feb 23, 2010 at 3:15 PM, Gökhan Sever <gok...@gm...>wrote: > >> >> >> On Tue, Feb 23, 2010 at 5:04 PM, Ariel Rokem <ar...@be...> wrote: >> >>> Hi - >>> >>> yes - but I want something that looks like the generic boxplot, but in >>> which I can control where the edges of the boxes are placed what the sizes >>> of the whiskers are. A combination of errorbar and bar, with this >>> appearance, if you will. >>> >>> Cheers - Ariel >>> >>> >> >> I guess then yours will be a non-standard box-plot because in a regular >> boxplot median is at 50th percentile, and the edges are at 25 and 75th >> respectively. There is no consensus for whiskers some uses 5 and 95 some 10 >> - 90 or you could come up with your own pair. Don't get surprised if you see >> different results for different percentiles. See at >> http://old.nabble.com/incorrect-boxplot--td25440025.html >> >> Probably you don't seek something like boxplot's widths kw arg if I >> understand you right? >> >> >> >>> >>> On Tue, Feb 23, 2010 at 2:49 PM, Gökhan Sever <gok...@gm...>wrote: >>> >>>> >>>> >>>> On Tue, Feb 23, 2010 at 3:02 PM, Ariel Rokem <ar...@be...>wrote: >>>> >>>>> Hi - more generally, is there any way to control the location of the >>>>> median line, the vertical size of the box and the vertical location of the >>>>> whiskers? >>>>> >>>>> Thanks - Ariel >>>>> >>>>> >>>> Aren't those generically calculated from the data? >>>> >>>> >>>> -- >>>> Gökhan >>>> >>> >>> >>> >>> -- >>> Ariel Rokem >>> Helen Wills Neuroscience Institute >>> University of California, Berkeley >>> http://argentum.ucbso.berkeley.edu/ariel >>> >> >> >> >> -- >> Gökhan >> > > > > -- > Ariel Rokem > Helen Wills Neuroscience Institute > University of California, Berkeley > http://argentum.ucbso.berkeley.edu/ariel > -- Gökhan
How does one ensure that once a graph has been produced by Matplotlib and that graph has been closed by the user that the program itself stops? What I am currently getting is that when I close the graph pop-up window and then close IDLE, I get a message that the program is still running and am I sure that I want to stop it. Yes, I am sure, but I don't want to have to keep killing the IDLE interpreter window in order to do so, but if I don't, then I am seemingly unable to produce another graph pop-up window. How do I control this from within the script itself? I am using Debian testing with Python 2.5.5 TIA AG
On Wed, Feb 24, 2010 at 8:17 AM, Friedrich Romstedt <fri...@gm...> wrote: > I'm not shure whether someone can release software under GPL > incorporating MIT licensed software? Otherwise I would release under > dual license. Yes, GPL projects can use MIT or BSD code, but not vice-versa.
http://neuroimaging.scipy.org/site/doc/manual/html/faq/johns_bsd_pitch.html: > Many people choose the GPL when releasing a package because it is the most famous open source license, and did not consider issues such as those raised here when choosing a license. Alan, Thank you for your comment. I think I will release diagram_cl as my first MIT project :-) Hope that it finds some users then. Also, I consider switching to MIT license completely. In fact, I like it much more, it's shorter, more concise, and you can use my software ... I'm not shure whether someone can release software under GPL incorporating MIT licensed software? Otherwise I would release under dual license. Friedrich 2010年2月24日 Alan G Isaac <ala...@gm...>: > On 2/24/2010 2:36 AM, Friedrich Romstedt wrote: >> Can you explain to me why you are so restrictive about GPLed code? I >> mean, it's all OSS? > > > The licenses are very different: BSD (and MIT) do not impose a viral > copyleft. This is why Python is not GPL, nor is NumPy or Matplotlib. > People writing code under BSD-like licenses must carefully avoid viral > infection from GPL'd code. > > Second, while John Hunter's views are not identical to mine, he > makes a collection of important points about licensing here: > http://neuroimaging.scipy.org/site/doc/manual/html/faq/johns_bsd_pitch.html > I'm going to treat John's note as enough of an answer to your question > unless you want more discussion. > > Naturally, since you wrote the code, you get to choose the license, and > your choice is obviously none of my business. Hopefully that goes > without saying, but I'll say it to avoid misunderstanding. > > >> Did you notice that it is not an example but an independent standalone >> package? I'm not shure about this because you always talk about >> "example". But maybe the summary is way too long, though ... > > Since you posted this on Matplotlib, I assumed you wanted people to be > able to look at how you did it, not just use it. I am not diminishing > the application by saying it looks to be a nice example of how to embded > Matplotlib in Tk. If it were BSD-licensed I would probably get around > to looking at your code. > > Alan Isaac
On Wed, Feb 24, 2010 at 7:14 AM, Alan G Isaac <ala...@gm...> wrote: > On 2/24/2010 2:36 AM, Friedrich Romstedt wrote: >> Can you explain to me why you are so restrictive about GPLed code? I >> mean, it's all OSS? > > > The licenses are very different: BSD (and MIT) do not impose a viral > copyleft. This is why Python is not GPL, nor is NumPy or Matplotlib. > People writing code under BSD-like licenses must carefully avoid viral > infection from GPL'd code. > > Second, while John Hunter's views are not identical to mine Nor mine <wink>. I would say several things differently today -- here is the version I wrote for the mpl docs: http://matplotlib.sourceforge.net/devel/coding_guide.html#why-bsd-compatible JDH
I found a solutiont. sharing with everyone... http://stackoverflow.com/questions/1874642/how-to-use-matplotlib-in-django see ya 2010年2月24日 Samuel Teixeira Santos <arc...@gm...> > Hi all > > Days ago I ask for tips about to improvemente my code on > http://dpaste.com/161149/ > > Today, it's work ok on my web app. > > I fill it a form and when press submit I generate the graphic. > > But, I fill it the form again and press submit again, it will generate a > second graphic > instead of reset the previous and created a new one. > > so... What I need to restart my plot for not print new graphics with the > previous one or on them? > > well. thanks in advanced all > > > Samuel >
On 2/24/2010 2:36 AM, Friedrich Romstedt wrote: > Can you explain to me why you are so restrictive about GPLed code? I > mean, it's all OSS? The licenses are very different: BSD (and MIT) do not impose a viral copyleft. This is why Python is not GPL, nor is NumPy or Matplotlib. People writing code under BSD-like licenses must carefully avoid viral infection from GPL'd code. Second, while John Hunter's views are not identical to mine, he makes a collection of important points about licensing here: http://neuroimaging.scipy.org/site/doc/manual/html/faq/johns_bsd_pitch.html I'm going to treat John's note as enough of an answer to your question unless you want more discussion. Naturally, since you wrote the code, you get to choose the license, and your choice is obviously none of my business. Hopefully that goes without saying, but I'll say it to avoid misunderstanding. > Did you notice that it is not an example but an independent standalone > package? I'm not shure about this because you always talk about > "example". But maybe the summary is way too long, though ... Since you posted this on Matplotlib, I assumed you wanted people to be able to look at how you did it, not just use it. I am not diminishing the application by saying it looks to be a nice example of how to embded Matplotlib in Tk. If it were BSD-licensed I would probably get around to looking at your code. Alan Isaac
marc desmarais-2 wrote: > > I created a simple scatter plot and a service routine to print out the > coordinates of the points I pick with the cursor (based on the demo). It > works until I select the pan or zoom cursor. After I zoom or pan, I can > no longer get back to the normal cursor which allows me to "pick" a > circle. Even clicking "home" doesn't help. > > The code is shown below > > -------------------------------------------------------------------------------- > from matplotlib import figure,pyplot > from numpy import linspace,sin,take > > fig=pyplot.figure() > > ax1=fig.add_subplot(1,1,1) # (numRows, numCols, plotNum) > > t=linspace(0,10,100) > y1=sin(5*t) > y2=y1+sin(10*t) > > line1=ax1.scatter(y1,y2,picker=True) > > def onpick1(event): > ind = event.ind > print 'onpick1 scatter:', ind, take(y1, ind), take(y2, ind) > > fig.canvas.mpl_connect('pick_event', onpick1) > pyplot.show() > -------------------------------------------------------------------------------- > > I ran into the same problem today. Does someone know of a workaround? I use a recent version of matplotlib and the default tk backend. It seems like the tool bar overrides any user defined events. Is there a way to deactivate the zoom and pan cursors? - Kjell Magne Fauske -- View this message in context: http://old.nabble.com/can%27t-picker-once-pan-or-zoom-chosen-tp25097973p27714178.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Kjell Magne Fauske wrote: > > > I ran into the same problem today. Does someone know of a workaround? I > use a recent version of matplotlib and the default tk backend. It seems > like the tool bar overrides any user defined events. Is there a way to > deactivate the zoom and pan cursors? > > - Kjell Magne Fauske > I'm sorry for the noise. To disable the zoom and pan cursors you just have to click the zoom or pan button again. Picking will then start working again. - Kjell Magne -- View this message in context: http://old.nabble.com/can%27t-picker-once-pan-or-zoom-chosen-tp25097973p27714182.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Jae-Joon Lee wrote: > This seems to be a bug and I recommend you to file a bug. > This happens because Axis.set_ticklabels method only changes the > attributes of left (or bottom) tick labels. > > Meanwhile, try > > for t in colorbar.ax.get_yticklabels(): > t.set_color("w") > > -JJ > Thanks for the explanation and alternative which works just fine! As per your suggestion, I have submitted a trouble report (2957923). entitled: "set_yticklabels(labels, color='white') ignored" -- jv > On Tue, Feb 23, 2010 at 11:03 AM, Jim Vickroy <Jim...@no...> wrote: > >> Hello, >> >> I'm (unsuccessfully) trying to generate a figure (with a labeled colorbar) >> having a black background. >> >> Here is the code. >> >> _purpose_ = 'demonstrate capability to create PNG with black background >> including labeled color bar' >> _author_ = 'jim...@no...' >> >> import numpy # http://numpy.scipy.org/ >> import matplotlib # http://matplotlib.sourceforge.net/index.html >> matplotlib.use('Agg') # http://matplotlib.sourceforge.net/backends.html -- >> probably the fastest, non-GUI, rendering backend >> import matplotlib.pyplot as plot # >> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot >> import matplotlib.cm # color maps >> >> import sys >> assert sys.version == '2.6.4 (r264:75708, Oct 26 2009, 08:23:19) >> [MSC v.1500 32 bit (Intel)]', sys.version >> assert numpy.__version__ == '1.4.0', numpy.__version__ >> assert matplotlib.__version__ == '0.99.1', matplotlib.__version__ >> >> data_min = 0 >> data_max = 256 >> data = numpy.random.randint(data_max, size=(512,512)) >> rows_cnt, columns_cnt = data.shape >> shape = rows_cnt, columns_cnt >> x = numpy.empty(data.shape, dtype=int) >> y = numpy.empty(data.shape, dtype=int) >> x[:] = numpy.arange(rows_cnt) >> y[:] = numpy.arange(columns_cnt) >> XI, YI = numpy.meshgrid(x[0], y[0]) >> >> title = 'this is the figure title' >> plot.clf() # clear the figure >> plot.title(title,color='white',backgroundcolor='black') >> plot.axis('off') >> colormap = 'gist_heat' >> config = dict(cmap=eval('matplotlib.cm.%s' % colormap), vmin=data_min, >> vmax=data_max) # vmin,vmax specify a fixed (color-map) scale >> plot.pcolormesh(XI, YI, data, **config) >> colorbar = plot.colorbar() >> ############################################################################################################################################################## >> # labels = ??? list of strings labels ??? >> labels = [str(i) for i in range(10)] >> colorbar.ax.set_yticklabels(labels, color='white') >> ############################################################################################################################################################## >> plot.imshow(data, interpolation='bilinear', cmap=config['cmap'], >> origin='upper', extent=[0,rows_cnt,0,columns_cnt]) >> # plot.show() # interactive >> filename = 'trial-plot-with-labeled-colorbar.png' >> plot.savefig(filename, facecolor='black') >> plot.close() >> >> which generates a figure with a black background and invisible (black) color >> bar labels. >> >> I'm probably going about this completely wrong. >> >> Questions: >> >> How do I get white color bar labels? >> How do I access the generated sequence of string labels (for use as the >> first set_yticklabels parameter) rather than artificially defining a list of >> labels? >> >> Thanks, >> -- jv >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Anyone here going to the meeting, see Subject? As far as I can tell, it meets from 7:30 to 9 pm. Their site shows no speaker yet, and there seems to be an informal group dinner at 6 pm at some place yet unknown. Are there other events and activities at the meeting? Pre-speaker events? Demonstrations? -- "There is nothing so annoying as to have two people talking when you're busy interrupting." -- Mark Twain
Hi all Days ago I ask for tips about to improvemente my code on http://dpaste.com/161149/ Today, it's work ok on my web app. I fill it a form and when press submit I generate the graphic. But, I fill it the form again and press submit again, it will generate a second graphic instead of reset the previous and created a new one. so... What I need to restart my plot for not print new graphics with the previous one or on them? well. thanks in advanced all Samuel
Indeed, with a fixed value, I could bypass this, but the main issue is that the documentation says that it should work (xx-small, x-small, small, medium, large, ... although I don't know if it should be larger, as indicated in rc() doc, or large as indicated in the font size doc IIRC). Matthieu 2010年2月24日 Philipp Bender <li...@ro...>: > The error is the 'size':'larger', not the passing as keyword arguments. Maybe > you try to stick (as "workaround") with a fixed number, like 'size':12 > > It's located in matplotlib/lib/matplotlib/rcsetup.py > > def validate_float(s): > 'convert s to float or raise' > try: return float(s) > except ValueError: > raise ValueError('Could not convert "%s" to float' % s) > > -> conversion of 'larger' to float fails, I don't know, maybe this should go > through "validate_fontsize" instead of "validate_float"? Or, if failed in > validate_floats, to validate_fontsize? Like > > > def validate_float(s): > 'convert s to float or raise' > try: return float(s) or validate_fontsize() > except ValueError: > raise ValueError('Could not convert "%s" to float' % s) > > Regards, > Philipp > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher
The error is the 'size':'larger', not the passing as keyword arguments. Maybe you try to stick (as "workaround") with a fixed number, like 'size':12 It's located in matplotlib/lib/matplotlib/rcsetup.py def validate_float(s): 'convert s to float or raise' try: return float(s) except ValueError: raise ValueError('Could not convert "%s" to float' % s) -> conversion of 'larger' to float fails, I don't know, maybe this should go through "validate_fontsize" instead of "validate_float"? Or, if failed in validate_floats, to validate_fontsize? Like def validate_float(s): 'convert s to float or raise' try: return float(s) or validate_fontsize() except ValueError: raise ValueError('Could not convert "%s" to float' % s) Regards, Philipp
Hi, I've tried to set the size of the main font by doing: import matplotlib.pyplot as pyplot font = {'size' : 'larger'} pyplot.rc('font', **font) as indicated in http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.rc It failed with: raise ValueError('Could not convert "%s" to float' % s) ValueError: Could not convert "larger" to float I'm using Matplotlib 0.99.1.2. Matthieu -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher
The following was sent unintentionally in private e-mail (my e-mail program always selects the sender as recipient first :-( ). I think the solution by Jae-Joon is also elegant, but nevertheless the following may be useful also (and maybe also in other places): ---------- Forwarded message ---------- From: Friedrich Romstedt <fri...@gm...> Date: 2010年2月24日 Subject: Re: [Matplotlib-users] Looping through all the built-in colormaps To: David Goldsmith <d_l...@ya...> > 0) is there some "elegant" way to do what I want to do? Don't know whether it's elegant or not, but it should do the job: for cmap_name in dir(cm): cmap_object = getattr(cm, cmap_name) if isinstance(cmap_object, matplotlib.colors.LinearSegmentedColormap): [...] > 1) why doesn't this: > >>>> for cmap in dir(cm): >>>> try: >>>> ax.imshow(image, cmap) >>>> canvas.print_figure('image_'+cmap) >>>> except: >>>> pass > > "work" (i.e., simply bypass those elements of dir(cm) which cause imshow to raise an exception, but then continue on as if nothing had happened)? Is this a bug? I guess it's because you have messed up with the internals of the axes, when passing an invalid entry. It gets stored somewhere without check, and then causes subsequent error occuring before the next element is applied fully, I guess. It's more a bug of your code than of matplotlib, because your argument did not fulfil specification :-) Friedrich
On Wed, Feb 24, 2010 at 3:56 AM, David Goldsmith <d_l...@ya...> wrote: > cmap='LUTSIZE' does not create an image: it is an invalid value for imshow's cmap argument. Many images are created successfully by my loop before cmap='LUTSIZE' without me calling cla, and Friedrich's soln. works great w/out me having to call cla. It DOES create an image at least in the svn version of matplotlib (although I consider it as a bug). But this may not be true in other version. As I said, without calling cla, you end up with bunch of overlapping images (unless hold is False). It DOES NOT mean that the results will be wrong. It only means that it will increase the drawing time and/or output size. You do not have to call cla if you don't care about these. You may check the number of images in the current figure by print len(ax.images) -JJ