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
(9) |
2
(8) |
3
|
4
(6) |
5
|
6
|
7
(41) |
8
(18) |
9
(25) |
10
(18) |
11
(10) |
12
(13) |
13
(7) |
14
(4) |
15
(12) |
16
(6) |
17
(9) |
18
(7) |
19
(2) |
20
(5) |
21
(7) |
22
(2) |
23
(11) |
24
(11) |
25
(14) |
26
(3) |
27
(3) |
28
(17) |
29
(7) |
30
(16) |
31
(8) |
|
|
From: Nate G. <nat...@ya...> - 2011-03-28 21:41:51
|
operating system $ uname -a Darwin nate-gallaghers-macbook-pro.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386 matplotlib version: matplotlib-1.0.1-python.org-32bit-py2.7-macosx10.3.dmg obtained from: http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0.1/ no customizations to matplotlibrc $ python simple_plot.py --verbose-helpful $HOME=/Users/ibook CONFIGDIR=/Users/ibook/.matplotlib matplotlib data path /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/mpl-data loaded rc file /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc matplotlib version 1.0.1 verbose.level helpful interactive is False units is False platform is darwin Using fontManager instance from /Users/ibook/.matplotlib/fontList.cache backend TkAgg version 8.5 findfont: Matching :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium to Bitstream Vera Sans (/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf) with score of 0.000000 Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1410, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 245, in resize self.show() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 249, in draw tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/tkagg.py", line 19, in blit tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode, id(bbox_array)) TclError |
From: C M <cmp...@gm...> - 2011-03-28 18:10:44
|
I should add, I can see that (I think) this needs to use a transform to get it in data coordinates, because if I do this to each rectObj (each bar): trans = rectObj.get_patch_transform() print 'trans is: ', trans I get: trans is: BboxTransformTo(Bbox(array([[ 734189.52541214, 730844. ], [ 734190.52541214, 730844.33333333]]))) Which shows the data-coordinate bboxes "in there", but that's now a BboxTransformTo object, not a Bbox object. I'm just don't know what method turns a display-coordinate bbox into a data-coordinate bbox. Thanks, Che |
From: C M <cmp...@gm...> - 2011-03-28 17:44:38
|
I need to get the bboxes for time-range bars (matplotlib.patches.Rectangle objects) on a bar plot for a custom autoscaling function. Right now, I get them like this, where rectObj = a bar and bboxes = a list of bboxes: bboxes.append(rectObj.get_path().get_extents()) print 'bboxes is: ', bboxes However, the print shows bboxes to be: bboxes is: [Bbox(array([[ 0., 0.], [ 1., 1.]])), Bbox(array([[ 0., 0.], [ 1., 1.]])), Bbox(array([[ 0., 0.], [ 1., 1.]])), Bbox(array([[ 0., 0.], [ 1., 1.]])), Bbox(array([[ 0., 0.], [ 1., 1.]])), Bbox(array([[ 0., 0.], [ 1., 1.]])), Bbox(array([[ 0., 0.], [ 1., 1.]])), Bbox(array([[ 0., 0.], [ 1., 1.]])), Bbox(array([[ 0., 0.], [ 1., 1.]])), Bbox(array([[ 0., 0.], [ 1., 1.]])), Bbox(array([[ 0., 0.], [ 1., 1.]])), Bbox(array([[ 0., 0.], [ 1., 1.]]))] This is not what I need, because these points have nothing to do with the y axis I'm scaling (in fact, what do they mean?). Instead, I need bboxes that look more like this: bboxes is: [Bbox(array([[ 734190.02541214, 730844.29166667], [ 734223.88252666, 730844.375 ]]))] (Although this is from getting the bboxes from a line, not a set of bars) These are in the floating point version of a date, which is what the y axis is scaled in. How can I get the bboxes of these bars in those coordinates? Thanks, Che |
From: Chris F. <fon...@gm...> - 2011-03-28 17:41:23
|
I'm running a recent build from source (last week) on OSX 10.6.6 and the Python 2.6.1 that ships with the OS. When I use the macosx backend, any plot that I generate results in a window that hangs. The Python dock icon bounces for awhile, then when it stops, the spinning beach ball appears and I am unable to interact with the window. I can, however, add plots to the window and update its contents with show(). This behaviour does not occur with other backends (e.g. TkAgg). I have tried switching interactive mode off in matplotlibrc, but this does not fix the problem. Thanks in advance for any ideas. |
From: Muffles <dan...@gm...> - 2011-03-28 16:41:26
|
Hello all, i have certain dates that i want to use as the xlabels, i have looked around but found nothing i can use. I get the date from the netcdf file in a format something like a timestamp, like: 16216 that i turn into 04:30:16 I want to know how can i use this as a label. Thx in advance -- View this message in context: http://old.nabble.com/Changing-labels-to-time-tp31260038p31260038.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Michael D. <md...@st...> - 2011-03-28 15:14:11
|
It could be that matplotlib is not finding any fonts on your system for some reason. It would be useful to know whether any of the examples on the matplotlib website work for you, or it is something specific to your plot code. Do you have any non-default settings in your matplotlibrc? Mike ________________________________________ From: Andre' Walker-Loud [wal...@gm...] Sent: Thursday, March 24, 2011 7:54 PM To: Michael Droettboom Cc: Matplotlib Users Subject: Re: [Matplotlib-users] matplotlib figures missing text Hi Michael, In both cases, I was first hoping someone else has experienced this problem, to know I am not alone in the universe. But since you asked, I am using the macosx backend - but find the same problem also with WXAgg and TkAgg. When you mention included examples, I do not find any in my /Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/mpl-data/example/ folder. Do you mean ones I find on the web at the matplotlib site? Thanks, Andre On Mar 24, 2011, at 4:31 PM, Michael Droettboom wrote: > On 03/24/2011 09:35 AM, Andre' Walker-Loud wrote: >> Hi All, >> >> I am having two slight irritating issues making figures with matplotlib (and have not found a solution with Google) >> >> I am running the Enthought 6.2 distribution (python 2.6, matplotlib 0.99.3, ipython 0.10, ...) which is installed as a Framework on a Mac OSX 10.6 platform. >> >> I currently am using (matplotlibrc file) >> >> backend : macosx (I find the same issues with WXAgg and TkAgg as well) >> ... >> text.usetex : true #use latex for all text handling >> >> >> Both problems began with my Enthought distribution (but for reasons I will spare you, I don't want to switch to a different installation if possible, except upgrade Enthought). >> >> >> Problem 1: >> With all my old installations, which existed on previous Mac OSX version (10.5), I did not need to set >> >> text.usetex : true #use latex for all text handling >> >> My text rendering worked fine. But with the Enthought version, for some reason, I got fatal errors. So I switched to having latex render all text. This wasn't a big deal, and it has been a while, so I don't have the error logs anymore. Just wondering if anyone else experienced this, and understands why? > Without seeing the content of the error, it's very hard to say why it might be failing. Can you set text.usetex back to False and send us the error output? >> >> >> Problem 2: (I believe unrelated to 1) >> >> I use the annotate command to add text to my figures, displaying analysis results. >> >> Frequently, when I save the figure as a PDF, these annotated texts do not appear in the saved PDF. I find that if I fiddle with the matplotlib gui figure-window, adjusting the size on my screen, then I can eventually get the saved PDF to contain this text. But this gets very annoying quickly, as almost never is the default size the one needed to properly capture the text in the saved figure, and it requires lots of fine-tuning with trial and error. >> >> If I instead save as PNG, I almost never have this problem (maybe never). >> >> >> Infrequently, the text doesn't even display in the gui window, until I fiddle with the size of the window. >> >> In both cases, NO errors are produced. My script which does the analysis and produces the figures uses >> >> from pylab import * >> >> but otherwise no "*" imports. >> >> >> My old Fink installation doesn't have this problem - but it was moved from my old Mac OSX 10.5 system, and there are some issues with the upgrade to Mac OSX 10.6, which lead me to need to just re-install everything fresh on the 10.6 OS. >> >> >> I am not sure if this problem is specific to Enthought's distribution (the latex tex rendering problem made me suspect this) or is just some bizarre Mac problem or ??? >> >> >> So, does anyone out there have the same or similar problem? And better yet, understand why and how to fix? > Which backend are you using? Can you provide a standalone plot that produces the error? Do any of the included examples (particularly those related to annotate) fail for you? > > Mike > ________________________________________ > From: Andre' Walker-Loud [wal...@gm...] > Sent: Thursday, March 24, 2011 12:35 PM > To: Matplotlib Users > Subject: [Matplotlib-users] matplotlib figures missing text > > Hi All, > > I am having two slight irritating issues making figures with matplotlib (and have not found a solution with Google) > > I am running the Enthought 6.2 distribution (python 2.6, matplotlib 0.99.3, ipython 0.10, ...) which is installed as a Framework on a Mac OSX 10.6 platform. > > I currently am using (matplotlibrc file) > > backend : macosx (I find the same issues with WXAgg and TkAgg as well) > ... > text.usetex : true #use latex for all text handling > > > Both problems began with my Enthought distribution (but for reasons I will spare you, I don't want to switch to a different installation if possible, except upgrade Enthought). > > > Problem 1: > With all my old installations, which existed on previous Mac OSX version (10.5), I did not need to set > > text.usetex : true #use latex for all text handling > > My text rendering worked fine. But with the Enthought version, for some reason, I got fatal errors. So I switched to having latex render all text. This wasn't a big deal, and it has been a while, so I don't have the error logs anymore. Just wondering if anyone else experienced this, and understands why? > > > Problem 2: (I believe unrelated to 1) > > I use the annotate command to add text to my figures, displaying analysis results. > > Frequently, when I save the figure as a PDF, these annotated texts do not appear in the saved PDF. I find that if I fiddle with the matplotlib gui figure-window, adjusting the size on my screen, then I can eventually get the saved PDF to contain this text. But this gets very annoying quickly, as almost never is the default size the one needed to properly capture the text in the saved figure, and it requires lots of fine-tuning with trial and error. > > If I instead save as PNG, I almost never have this problem (maybe never). > > > Infrequently, the text doesn't even display in the gui window, until I fiddle with the size of the window. > > In both cases, NO errors are produced. My script which does the analysis and produces the figures uses > > from pylab import * > > but otherwise no "*" imports. > > > My old Fink installation doesn't have this problem - but it was moved from my old Mac OSX 10.5 system, and there are some issues with the upgrade to Mac OSX 10.6, which lead me to need to just re-install everything fresh on the 10.6 OS. > > > I am not sure if this problem is specific to Enthought's distribution (the latex tex rendering problem made me suspect this) or is just some bizarre Mac problem or ??? > > > So, does anyone out there have the same or similar problem? And better yet, understand why and how to fix? > > > Thanks, > > Andre > > > > > > > > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Businesses > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Checker > today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Michael D. <md...@st...> - 2011-03-28 15:13:52
|
Set the ps.fonttype to "42", which will embed the entire font. ps.fonttype = 3 (the default) subsets the font to only the characters used in the plot, and stores them as curves for maximum portability. Mike ________________________________________ From: Lebostein [Leb...@gm...] Sent: Friday, March 25, 2011 5:30 PM To: mat...@li... Subject: [Matplotlib-users] usetex = True + eps output -> letters are only curves Hi, if I create an eps from a matplotlib chart with matplot.rc('font', size=fsize, family='serif', serif='Computer Modern Roman') matplot.rc('text', usetex = True) matplot.rc('text.latex', unicode = True) then I can't mark the letters in eps viewer. And I can't search for letters and words in the eps. It seems, the letters are curves in the eps. Why? If I create a pdf, I can mark letters and words an I can search too. How I can create an eps output with embedded font and "real" letters? -- View this message in context: http://old.nabble.com/usetex-%3D-True-%2B-eps-output--%3E-letters-are-only-curves-tp31242096p31242096.html Sent from the matplotlib - users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Michael D. <md...@st...> - 2011-03-28 15:09:02
|
Would you mind filing a bug for this in the issue tracker? https://github.com/matplotlib/matplotlib/issues Mike ________________________________________ From: Jim Ford [jfo...@gm...] Sent: Friday, March 25, 2011 11:25 AM To: mat...@li... Subject: Re: [Matplotlib-users] ramp shaped bars? Well, what do you know? For once, the call of the noob, "Hey! there must be a bug" speaks truth. Thanks, Angus! I added a little code to duplicate the last point until the array length is at least 5, and everything looks just fine. On 03/25/2011 01:10 PM, Angus McMorland wrote: > On 25 March 2011 07:31, jford14685<jfo...@gm...> wrote: >> I am a newbie Python programmer trying to make 3d barplots like >> http://matplotlib.sourceforge.net/examples/mplot3d/bars3d_demo.html this >> one on the Matplotlib site. >> >> When I run the demo source (python bars3d_demo.py) it works fine. I then >> changed the way xs and ys are assigned, to >> xs = np.array([1.,2.,3.]) # was xs = np.arange(20) >> ys = np.array([1.,2.,3.]) # was ys = np.random.rand(20) >> ax.bar(xs, ys, zs=1, zdir='y', color='r', alpha=0.8) >> (ditto for two other data sets) >> >> Now the bars are triangles. The right side of each bar is of the correct >> height, but the left side of each bar starts at zero. > Here's another data point. My guess is this is a bug with Axes3D: I > can recreate the problem with 3 bars, but with>4 bars everything > works okay. On my setup, with exactly 4 bars, the leftmost edge of the > bars doesn't get a border, so something possibly related is going on > there too. > > Angus. ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Michael D. <md...@st...> - 2011-03-28 15:08:55
|
I would recommend running the import in the Python profiler to determine where most of the time is going. When I investigated this a few years back, it was mainly due to loading the GUI toolkits, which are understandably quite large. You can avoid most of that by using the Agg backend. If you're using the Agg backend and still experiencing slowness, it may be that load-up issues have crept back into matplotlib since then -- but we need profiling data to figure out where and how. Mike ________________________________________ From: David Kremer [dav...@gm...] Sent: Monday, March 28, 2011 9:36 AM To: Matplotlib Users Subject: [Matplotlib-users] matplotlib is slow Hello everyone, I would like to draw the attention on the slow startup of matplotlib. Indeed, running matplotlib takes a long time. I performed the following sequence : ```bash #!/bin/bash for i in * ; do python2 -c "from temp import * ; plot_(\"${i}\") " ; done ``` with temp.py like this : ```python #!/usr/bin/env python2 import sys import matplotlib.pyplot as plt import read_data as rd import numpy def plot_( fname ): P,I = rd.read_data(fname) Iprime = [ l / k for k , l in zip( numpy.diff(P) , numpy.diff(I) ) ] fig = plt.figure() ax1 = fig.add_subplot(211) ax2 = fig.add_subplot(212) ax1.plot(P,I) ax2.plot(P[:-1],Iprime) fig.savefig( fname + ".pdf", format='pdf' ) ``` And it seems the longer operation is to import matplotlib.pyplot. Does something could be done to improve the loading time of this module ? Thank you very much. greatings, David Kremer ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: John H. <jd...@gm...> - 2011-03-28 14:14:56
|
On Mon, Mar 28, 2011 at 8:19 AM, Paulo J. Matos <poc...@gm...> wrote: > Hi, > > I am trying to use matplotlib on a server which I don't run without it > installed. I tried untarring it to a folder in the path of PYTHONPATH > and using it directly without any luck. > > Has anyone successfully installed matplotlib and its dependencies under > a user account? Sure, that's not particularly difficult. But untarring won't be enough. You also have to build it. We'd need to know more about your platform to help, but basically: install the dependencies and then run > python setup.py install --prefix=~/mylocal On ubuntu and similar, you can get the build dependencies by first doing > sudo python setup.py build_dep python-matplotlib See http://matplotlib.sourceforge.net/users/installing.html For running on a web app server, see also http://matplotlib.sourceforge.net/faq/howto_faq.html#matplotlib-in-a-web-application-server JDH |
From: David K. <dav...@gm...> - 2011-03-28 13:36:15
|
Hello everyone, I would like to draw the attention on the slow startup of matplotlib. Indeed, running matplotlib takes a long time. I performed the following sequence : ```bash #!/bin/bash for i in * ; do python2 -c "from temp import * ; plot_(\"${i}\") " ; done ``` with temp.py like this : ```python #!/usr/bin/env python2 import sys import matplotlib.pyplot as plt import read_data as rd import numpy def plot_( fname ): P,I = rd.read_data(fname) Iprime = [ l / k for k , l in zip( numpy.diff(P) , numpy.diff(I) ) ] fig = plt.figure() ax1 = fig.add_subplot(211) ax2 = fig.add_subplot(212) ax1.plot(P,I) ax2.plot(P[:-1],Iprime) fig.savefig( fname + ".pdf", format='pdf' ) ``` And it seems the longer operation is to import matplotlib.pyplot. Does something could be done to improve the loading time of this module ? Thank you very much. greatings, David Kremer |
From: Paulo J. M. <poc...@gm...> - 2011-03-28 13:25:21
|
Hi, I am trying to use matplotlib on a server which I don't run without it installed. I tried untarring it to a folder in the path of PYTHONPATH and using it directly without any luck. Has anyone successfully installed matplotlib and its dependencies under a user account? Cheers, -- PMatos |
From: Nicolas B. <nbi...@gm...> - 2011-03-28 13:03:52
|
On Mon, Mar 14, 2011 at 9:05 AM, herbie13 <g.h...@du...> wrote: > > Hello, > > I basically have a Chi-Squared distribution that is dependent on 3 > variables. > eg. X2(x, y, z) > > What I would like to do is be able to plot the chi-squared + 1 surface in > 3-dimensions. > eg. I would like to have the three axes as x, y and z. and then have a > surface (its going to look like a closed blob effectively) that maps the > chi-squared plus one surface. > > I have no idea how to do this though. Is it possible? any ideas? > I think matplotlib is relatively limited in its 3D capabilities. I would suggest trying Mayavi2 with a contour3d[1] or a volume[2,3]. Look here[4] for many examples. [1] http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/mlab_helper_functions.html#enthought.mayavi.mlab.contour3d [2] http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/example_chemistry.html#example-chemistry [3] http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/example_protein.html#example-protein [4] http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/examples.html |
From: Lebostein <Leb...@gm...> - 2011-03-28 10:29:53
|
Is it possible to teach matplotlib to calculate text heights without ascender and descender? If I use a comma to print decimal values (german notation) it looks awful but the "center of gravity" is not the median. Matplotlib use the center of the full text height (included ascender and descender height).... -- View this message in context: http://old.nabble.com/text-height-without-ascender-and-descender-tp31256627p31256627.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Warren W. <war...@en...> - 2011-03-28 02:23:48
|
On Sun, Mar 27, 2011 at 8:25 PM, Angus McMorland <am...@gm...> wrote: > On 27 March 2011 20:47, Warren Weckesser <war...@en...> > wrote: > > I'm using matplotlib 1.0.1. I have the following simple script to plot a > > surface: > > > > ----- > > from numpy import linspace, sin, cos, meshgrid > > > > from matplotlib.pyplot import figure, show, xlabel, ylabel > > from matplotlib import cm > > from mpl_toolkits.mplot3d import Axes3D > > > > n = 35 > > x = linspace(-5, 5, n) > > y = linspace(0, 10, n) > > X, Y = meshgrid(x, y) > > Z = X*sin(X)*cos(0.25*Y) > > > > fig = figure() > > ax = fig.gca(projection='3d') > > ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.copper) > > xlabel('x') > > ylabel('y') > > show() > > ----- > > > > It works fine--many thanks to all the folks working on the 3D plots! > > > > But notice that Axes3D is imported from matplotlib.mplot3d, but never > > explicitly used. If I comment out that import, however, I get the > following > > traceback: > > ----- > > Traceback (most recent call last): > > File "surf_demo.py", line 15, in <module> > > ax = fig.gca(projection='3d') > > File > > > "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/figure.py", > > line 965, in gca > > return self.add_subplot(111, **kwargs) > > File > > > "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/figure.py", > > line 675, in add_subplot > > projection_class = get_projection_class(projection) > > File > > > "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/projections/__init__.py", > > line 61, in get_projection_class > > raise ValueError("Unknown projection '%s'" % projection) > > ValueError: Unknown projection '3d' > > ----- > > > > Is this expected? > > Yes, the last lines of axes3d.py, which get called when Axes3D is imported, > are: > > import matplotlib.projections as proj > proj.projection_registry.register(Axes3D) > > which is what lets matplotlib know about the '3d' projection. Just > importing the Axes3D module therefore performs the necessary > registration of the projection to be able to use it in subsequent > code. Code analysis tools like rope don't know about this behind the > scenes stuff though, so it looks like a redundant import to them. > OK, thanks. Warren > > Angus. > -- > AJC McMorland > Post-doctoral research fellow > Neurobiology, University of Pittsburgh > |
From: Angus M. <am...@gm...> - 2011-03-28 01:25:37
|
On 27 March 2011 20:47, Warren Weckesser <war...@en...> wrote: > I'm using matplotlib 1.0.1. I have the following simple script to plot a > surface: > > ----- > from numpy import linspace, sin, cos, meshgrid > > from matplotlib.pyplot import figure, show, xlabel, ylabel > from matplotlib import cm > from mpl_toolkits.mplot3d import Axes3D > > n = 35 > x = linspace(-5, 5, n) > y = linspace(0, 10, n) > X, Y = meshgrid(x, y) > Z = X*sin(X)*cos(0.25*Y) > > fig = figure() > ax = fig.gca(projection='3d') > ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.copper) > xlabel('x') > ylabel('y') > show() > ----- > > It works fine--many thanks to all the folks working on the 3D plots! > > But notice that Axes3D is imported from matplotlib.mplot3d, but never > explicitly used. If I comment out that import, however, I get the following > traceback: > ----- > Traceback (most recent call last): > File "surf_demo.py", line 15, in <module> > ax = fig.gca(projection='3d') > File > "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/figure.py", > line 965, in gca > return self.add_subplot(111, **kwargs) > File > "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/figure.py", > line 675, in add_subplot > projection_class = get_projection_class(projection) > File > "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/projections/__init__.py", > line 61, in get_projection_class > raise ValueError("Unknown projection '%s'" % projection) > ValueError: Unknown projection '3d' > ----- > > Is this expected? Yes, the last lines of axes3d.py, which get called when Axes3D is imported, are: import matplotlib.projections as proj proj.projection_registry.register(Axes3D) which is what lets matplotlib know about the '3d' projection. Just importing the Axes3D module therefore performs the necessary registration of the projection to be able to use it in subsequent code. Code analysis tools like rope don't know about this behind the scenes stuff though, so it looks like a redundant import to them. Angus. -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh |
From: Warren W. <war...@en...> - 2011-03-28 00:48:20
|
I'm using matplotlib 1.0.1. I have the following simple script to plot a surface: ----- from numpy import linspace, sin, cos, meshgrid from matplotlib.pyplot import figure, show, xlabel, ylabel from matplotlib import cm from mpl_toolkits.mplot3d import Axes3D n = 35 x = linspace(-5, 5, n) y = linspace(0, 10, n) X, Y = meshgrid(x, y) Z = X*sin(X)*cos(0.25*Y) fig = figure() ax = fig.gca(projection='3d') ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.copper) xlabel('x') ylabel('y') show() ----- It works fine--many thanks to all the folks working on the 3D plots! But notice that Axes3D is imported from matplotlib.mplot3d, but never explicitly used. If I comment out that import, however, I get the following traceback: ----- Traceback (most recent call last): File "surf_demo.py", line 15, in <module> ax = fig.gca(projection='3d') File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/figure.py", line 965, in gca return self.add_subplot(111, **kwargs) File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/figure.py", line 675, in add_subplot projection_class = get_projection_class(projection) File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/matplotlib/projections/__init__.py", line 61, in get_projection_class raise ValueError("Unknown projection '%s'" % projection) ValueError: Unknown projection '3d' ----- Is this expected? Warren |