SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(10)
2
(17)
3
(14)
4
(28)
5
(23)
6
(12)
7
(3)
8
(11)
9
(29)
10
(31)
11
(9)
12
(35)
13
(3)
14
(9)
15
(16)
16
(14)
17
(10)
18
(7)
19
(3)
20
21
(4)
22
(6)
23
(14)
24
(16)
25
(10)
26
(5)
27
(4)
28
(8)
29
(19)
30
(21)




Showing results of 383

<< < 1 2 3 4 5 .. 16 > >> (Page 3 of 16)
From: Daniel <dan...@gm...> - 2009年06月27日 11:03:15
hi list,
I'm new to matplotlib. My environment is WinXP, PythonWin 2.6.2, NumPy
1.3.0, matplotlib 0.98.5.3.
>>> import matplotlib.pylab as pylab
Traceback (most recent call last):
 File "<interactive input>", line 1, in <module>
 File "D:\Python26\lib\site-packages\matplotlib\pylab.py", line 253, in
<module>
 from matplotlib.pyplot import *
 File "D:\Python26\lib\site-packages\matplotlib\pyplot.py", line 75, in
<module>
 new_figure_manager, draw_if_interactive, show = pylab_setup()
 File "D:\Python26\lib\site-packages\matplotlib\backends\__init__.py", line
25, in pylab_setup
 globals(),locals(),[backend_name])
 File "D:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 8, in <module>
 import tkagg # Paint image to Tk photo blitter extension
 File "D:\Python26\lib\site-packages\matplotlib\backends\tkagg.py", line 1,
in <module>
 import _tkagg
ImportError: DLL load failed: cannot find the module
I searched the web and it's said because of lack of msvcp71.dll, but there
is already on in my C:\windows\system32\
anyone can help?
Thanks.
From: LB <bra...@gm...> - 2009年06月27日 06:44:11
 Hi,
The documentation presented on http://matplotlib.sourceforge.net/examples is
a very good source of information but on some pages it doesn't give all the
data needed to have the example running.
Indeed, some example needs external files and they are not given in the web
documentation, for example :
http://matplotlib.sourceforge.net/examples/user_interfaces/mpl_with_glade.html
needs "mpl_with_glade.glade"
http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_wx3.html
needs "../data/embedding_in_wx3.xrc"
I thing there should be some links on the web pages to download theses
files.
At least, it should be said in the docstring where to find them, don't you
think ?
-- 
LB
From: Jae-Joon L. <lee...@gm...> - 2009年06月26日 17:46:37
I guess you're providing an input data with a wrong shape.
 aa = np.transpose([listA, listB, listC])
 plt.hist(aa, bins=4, histtype='bar',
alpha=0.75,rwidth=0.85,label=['A','B','C'])
Regards,
-JJ
On Thu, Jun 25, 2009 at 1:37 AM, Uma S<uma...@gm...> wrote:
>
> Hi,
> I have the same problem. If you found the solution could you please post?
>
> Thanks
>
> uma
>
>
>
> Yves-Alexandre wrote:
>>
>> Hi,
>>
>> I'm trying to add label to a histogram with multiple data. The doc says
>> "label can also be a sequence of strings" but when I try:
>>
>> plt.hist([listA, listB, listC], bins=25, histtype='bar',
>> alpha=0.75,rwidth=0.85,label=['A','B','C'])
>>
>> I got an error:
>> "AttributeError: 'tuple' object has no attribute 'startswith'"
>> (for the entire traceback see http://paste.pocoo.org/show/119820/ )
>>
>> is it me or a bug?
>>
>> Can I add a legend in another way?
>>
>> thanks in advance!
>>
>> -Yva.
>>
>> ------------------------------------------------------------------------------
>> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
>> is a gathering of tech-side developers & brand creativity professionals.
>> Meet
>> the minds behind Google Creative Lab, Visual Complexity, Processing, &
>> iPhoneDevCamp as they present alongside digital heavyweights like
>> Barbarian
>> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Histogram-with-multiple-data-tp23787422p24197283.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Sandro T. <mat...@gm...> - 2009年06月26日 14:28:47
Hello Jack,
On Wed, Jun 24, 2009 at 22:07, Jack Yu<jac...@go...> wrote:
> Hi everyone,
>
> I am trying to install the latest version of matplotlib from svn. However,
> after cd-ing into the matplotlib directory, and running "python setup.py
> install --prefix=${path}", I get the following error:
>
> /usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
> /usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
> /usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
> /usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
> /usr/bin/ld: cannot find -lz
> collect2: ld returned 1 exit status
> error: command 'c++' failed with exit status 1
>
> I don't really understand what I need to do from this error message. Does
> it mean that I have to install 'zlib'?  I am using python 2.4.3, and numpy
> 1.2.1.
you need to install the development package (in the common sense, for
your pacakge manager) to be able to compile code that dinamically
links to libz. For example on Debian with libz-dev (provided by
zlib1g-dev).
Install a similar package for your distrivution and try to recompile matplotlib.
Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
From: guillaume r. <gra...@wy...> - 2009年06月26日 08:58:27
I forgot to CC the list :S
and I updated to svn trunk and it now works fine :)
guillaume ranquet wrote:
> this question raised my interest and I tried It.
> unfortunately, I get errors :(
> 
> when executing the demo source code linked, I get
> 
> 
> $ python ~/testmpl.py
> Traceback (most recent call last):
> File "/home/granquet/testmpl.py", line 7, in <module>
> ncol=2, mode="expand", borderaxespad=0.)
> File "/usr/lib/python2.6/site-packages/matplotlib/pyplot.py", line
> 2447, in legend
> ret = gca().legend(*args, **kwargs)
> File "/usr/lib/python2.6/site-packages/matplotlib/axes.py", line 3823,
> in legend
> self.legend_ = mlegend.Legend(self, handles, labels, **kwargs)
> TypeError: __init__() got an unexpected keyword argument 'bbox_to_anchor'
> 
> I tried with a .set_bbox_to_anchor() but I get:
> AttributeError: 'Legend' object has no attribute 'set_bbox_to_anchor'
> 
> using matplotlib 0.98.5.3 on linux/gentoo
> am I missing something? or is my version of matplotlib not appropriate?
> 
> Jae-Joon Lee wrote:
>> The linked page below shows how you put the legend above the graph.
>>
>> http://matplotlib.sourceforge.net/users/plotting/legend.html#legend-location
>>
>> You can put it below the axes by adjusting the bbox_to_anchor parameter.
>> Try something like
>> bbox_to_anchor=(0., -0.1, 1., -0.1), loc=1
>>
>> Make sure to adjust the suplot parameter (or axes location) to make
>> enough room for the legend.
>>
>> -JJ
>>
>>
>>
>> On Thu, Jun 25, 2009 at 9:22 PM, Chris Spencer<chr...@gm...> wrote:
>>> How do you show the legend below the graph, so it doesn't overlap at
>>> all with the graph? The docs for the legend() "loc" parameter only
>>> seem to specify where *on* the graph you want it to show, which is
>>> driving me nuts because even using "best", it usually hides some of my
>>> data.
>>>
>>> I want to see *all* of my graph, as well as the legend. Is there any
>>> way to do this with pylab?
>>>
>>> Any help is appreciated.
>>>
>>> Chris
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
----
This message contains confidential information and may contain information that is legally privileged. If you have received this message by mistake, please immediately notify us and delete the original message. Thank you. 
Ce message contient des informations confidentielles. S'il vous est parvenu par erreur, merci de bien vouloir nous en aviser par retour, de n'en faire aucun usage et de n'en garder aucune copie.
----
From: Jae-Joon L. <lee...@gm...> - 2009年06月26日 02:20:56
The linked page below shows how you put the legend above the graph.
http://matplotlib.sourceforge.net/users/plotting/legend.html#legend-location
You can put it below the axes by adjusting the bbox_to_anchor parameter.
Try something like
 bbox_to_anchor=(0., -0.1, 1., -0.1), loc=1
Make sure to adjust the suplot parameter (or axes location) to make
enough room for the legend.
-JJ
On Thu, Jun 25, 2009 at 9:22 PM, Chris Spencer<chr...@gm...> wrote:
> How do you show the legend below the graph, so it doesn't overlap at
> all with the graph? The docs for the legend() "loc" parameter only
> seem to specify where *on* the graph you want it to show, which is
> driving me nuts because even using "best", it usually hides some of my
> data.
>
> I want to see *all* of my graph, as well as the legend. Is there any
> way to do this with pylab?
>
> Any help is appreciated.
>
> Chris
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Chris S. <chr...@gm...> - 2009年06月26日 01:22:41
How do you show the legend below the graph, so it doesn't overlap at
all with the graph? The docs for the legend() "loc" parameter only
seem to specify where *on* the graph you want it to show, which is
driving me nuts because even using "best", it usually hides some of my
data.
I want to see *all* of my graph, as well as the legend. Is there any
way to do this with pylab?
Any help is appreciated.
Chris
From: jules h. <hu...@ha...> - 2009年06月25日 23:19:33
Paul
Eric's attachment was missing.
This is the crontab we use, which he described:
- we use bash
- the file config/bash_env has most of what is usually in .bashrc;
	for cron we source it, for shell we source it in .bashrc
- "daily.py --use_defaults" is the command that we want to run
- don't forget that early inclusion of
	matplotlib.use('Agg')
## here is the relevant part of crontab
# m h dom mon dow command
40 20 * * * (cd $HOME; . config/bash_env; daily.py --use_defaults) > $HOME/tmp/cron.log 2>& 1
Reference for matplotlib.use('Agg'):
http://matplotlib.sourceforge.net/faq/howto_faq.html?highlight=agg#generate-images-without-having-a-window-popup
Jules
From: Eric F. <ef...@ha...> - 2009年06月25日 22:05:11
Attachments: crontab.uhdas
Paul Simon wrote:
> I've written my first python script with matplotlib, which works fine at 
> the command line but not with cron. It's quite puzzling to me, and 
> probably involves some path declaration that I don't know about.
> 
> #plot data from automate.csv
> import matplotlib
Right here you should include:
matplotlib.use('Agg')
Without this, you are loading the interactive graphical backend, gtkagg. 
I don't know whether this is causing the problem with running under 
cron, but it is worth changing anyway.
I don't know why your debug output file is stopping after the first 
fontManager line.
What does your crontab file look like? I think this is more a cron 
problem than an mpl problem. Cron tends to run things in a very 
different environment than one has when running from the command line, 
and it is common--at least in my own experience--to have this sort of 
problem with things that work on the command line and not from cron.
Attached is a crontab file that we use in this manner. Note that we set 
the shell to /bin/bash; otherwise cron will use the most minimal shell 
version. Second, note that before executing the script, we execute a 
file that sets up the environment to be similar to what we have when 
logged in normally. Third, the redirection of stdout and stderr to a 
log file facilitates debugging, allowing you to see the result of 
debugging print statements as well as any exceptions or other error 
messages.
Eric
> import datetime
> import numpy
> from matplotlib import legend
> from matplotlib.pyplot import figure, show, plot_date, setp, ylabel, 
> savefig, xlabel
> from matplotlib.dates import DayLocator, HourLocator, DateLocator, 
> DateFormatter,drange, MinuteLocator, date2num, num2date
> from matplotlib.mlab import csv2rec
> from matplotlib.ticker import *
> newr = csv2rec('/home/paulsimon/Documents/automate.csv')
> x = date2num(newr.field(0))
> fig = figure()
> ax1 = fig.add_subplot(111)
> line1, = ax1.plot_date(newr['dattim'], newr['bench_1'], '-r',label = 
> 'bench 1')
> line2, = ax1.plot_date(newr['dattim'], newr['bench_2'], '-b', label = 
> 'bench 2')
> line3, = ax1.plot_date(newr['dattim'], newr['eave'],'-k', label = 'eave')
> line4, = ax1.plot_date(newr['dattim'], newr['outside'], '-g', label = 
> 'outside')
> 
> ylabel('temperature')
> xlabel(r'time/date')
> hours = HourLocator(range(0,26,4))
> 
> dateformatter = DateFormatter('%I:%M %p\n%m/%d/%y')
> ax1.xaxis.set_major_formatter(dateformatter)
> ax1.xaxis.set_major_locator(hours)
> ax1.set_ylim(30,100)
> # Rotate x labels
> for label in ax1.xaxis.get_ticklabels():
> label.set_fontsize(8)
> 
> ax1.grid(True)
> ax1.xaxis.grid(False)
> yminorLocator = MultipleLocator(5)
> ax1.yaxis.set_minor_locator(yminorLocator)
> ax1.yaxis.grid(True,which='major', linestyle ='-')
> ax1.yaxis.grid(True,which='minor',linestyle = ':')
> leg = ax1.legend(('bench 1', 'bench 2', ' eave', 'outside'), 'lower 
> right', shadow = True)
> for t in leg.get_texts():
> t.set_fontsize('small')
> 
> savefig('/home/paulsimon/python_scripts/image.png', format = 'png')
> 
> 
> Running with --debug option, here are the two different output files:
> 
> $HOME=/home/paulsimon
> CONFIGDIR=/home/paulsimon/.matplotlib
> matplotlib data path /usr/lib/python2.5/site-packages/matplotlib/mpl-data
> loaded rc file 
> /usr/lib/python2.5/site-packages/matplotlib/mpl-data/matplotlibrc
> matplotlib version 0.91.2
> verbose.level debug
> interactive is False
> units is False
> platform is linux2
> loaded modules: ['_bisect', 'xml.sax.urlparse', 'distutils', 
> 'matplotlib.matplotlib', 'datetime', 'matplotlib.tempfile', 
> 'distutils.sysconfig', 'encodings.encodings', 'pytz.cStringIO', 'xml', 
> 'distutils.dep_util', 'struct', 'tempfile', 'xml.sax.urllib', 'imp', 
> '_struct', 'pytz.os', 'zipimport', 'string', 'encodings.utf_8', 
> 'matplotlib.__future__', 'pytz.tzinfo', 'pytz.datetime', 'distutils.re', 
> 'bisect', 'signal', 'random', 'xml.sax.xmlreader', 'matplotlib.pytz', 
> 'distutils.log', 'pytz.tzfile', 'cStringIO', 'pkgutil', 'locale', 
> 'xml.sax.saxutils', 'encodings', 'dateutil', 'matplotlib.warnings', 
> 'matplotlib.string', 'pytz.pytz', 'urllib', 'matplotlib.sys', 're', 
> 'new', 'math', 'fcntl', 'UserDict', 'distutils.os', 'matplotlib', 
> 'codecs', 'md5', '_locale', 'matplotlib.sre_constants', 'matplotlib.os', 
> 'thread', 'pkg_resources', 'weakref', 'itertools', 'distutils.spawn', 
> 'distutils.sys', 'os', 'sre_parse', '__future__', 'matplotlib.copy', 
> 'xml.sax.types', '_sre', '__builtin__', 'matplotlib.re', 'operator', 
> 'distutils.util', 'distutils.string', 'matplotlib.datetime', 
> 'posixpath', 'errno', '_socket', 'binascii', 'sre_constants', 
> 'matplotlib.md5', 'types', 'pytz.sys', 'xml.sax.handler', 
> 'pytz.pkg_resources', 'xml.sax.os', 'matplotlib.xml', '_codecs', 'pytz', 
> 'matplotlib.pyparsing', 'copy', 'socket', '_types', 
> 'matplotlib.dateutil', 'hashlib', 'posix', 'encodings.aliases', 
> 'matplotlib.fontconfig_pattern', 'exceptions', 'xml.sax._exceptions', 
> 'pytz.bisect', 'distutils.distutils', 'copy_reg', 'sre_compile', 
> 'xml.sax', '_hashlib', '_random', 'pytz.struct', 'site', '__main__', 
> 'shutil', 'matplotlib.weakref', 'strop', 'encodings.codecs', 'gettext', 
> 'matplotlib.rcsetup', 'pytz.sets', 'xml.sax.codecs', 'stat', '_ssl', 
> 'warnings', 'encodings.types', 'sets', 'sys', 'xml.sax.sys', 'os.path', 
> 'pytz.gettext', 'matplotlib.distutils', '_weakref', 'distutils.errors', 
> 'urlparse', 'linecache', 'matplotlib.shutil', 'time']
> Using fontManager instance from 
> /home/paulsimon/.matplotlib/fontManager.cache
> numerix numpy 1.0.4
> backend GTKAgg version 2.12.1
> findfont found Bitstream Vera Sans, normal, normal 400, normal, 8.0
> findfont returning 
> /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
> findfont found Bitstream Vera Sans, normal, normal 400, normal, 8.0
> findfont returning 
> /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
> findfont found Bitstream Vera Sans, normal, normal 400, normal, 8.0
> 
> ...
> 
> 
> findfont returning 
> /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
> findfont found Bitstream Vera Sans, normal, normal 400, normal, 9.996
> findfont returning 
> /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
> 
> And this is the output file (complete) running under cron:
> 
> $HOME=/home/paulsimon
> CONFIGDIR=/home/paulsimon/.matplotlib
> matplotlib data path /usr/lib/python2.5/site-packages/matplotlib/mpl-data
> loaded rc file 
> /usr/lib/python2.5/site-packages/matplotlib/mpl-data/matplotlibrc
> matplotlib version 0.91.2
> verbose.level debug
> interactive is False
> units is False
> platform is linux2
> loaded modules: ['_bisect', 'xml.sax.urlparse', 'distutils', 
> 'matplotlib.matplotlib', 'datetime', 'matplotlib.tempfile', 
> 'distutils.sysconfig', 'encodings.encodings', 'pytz.cStringIO', 'xml', 
> 'distutils.dep_util', 'struct', 'tempfile', 'xml.sax.urllib', 'imp', 
> '_struct', 'pytz.os', 'zipimport', 'string', 'matplotlib.__future__', 
> 'pytz.tzinfo', 'pytz.datetime', 'distutils.re', 'bisect', 'signal', 
> 'random', 'xml.sax.xmlreader', 'matplotlib.pytz', 'distutils.log', 
> 'pytz.tzfile', 'cStringIO', 'pkgutil', 'locale', 'xml.sax.saxutils', 
> 'encodings', 'dateutil', 'matplotlib.warnings', 'matplotlib.string', 
> 'pytz.pytz', 'urllib', 'matplotlib.sys', 're', 'new', 'math', 'fcntl', 
> 'UserDict', 'distutils.os', 'matplotlib', 'codecs', 'md5', '_locale', 
> 'matplotlib.sre_constants', 'matplotlib.os', 'thread', 'pkg_resources', 
> 'weakref', 'itertools', 'distutils.spawn', 'distutils.sys', 'os', 
> 'sre_parse', '__future__', 'matplotlib.copy', 'xml.sax.types', '_sre', 
> '__builtin__', 'matplotlib.re', 'operator', 'distutils.util', 
> 'distutils.string', 'matplotlib.datetime', 'posixpath', 'errno', 
> '_socket', 'binascii', 'sre_constants', 'matplotlib.md5', 'types', 
> 'pytz.sys', 'xml.sax.handler', 'pytz.pkg_resources', 'xml.sax.os', 
> 'matplotlib.xml', '_codecs', 'pytz', 'matplotlib.pyparsing', 'copy', 
> 'socket', '_types', 'matplotlib.dateutil', 'hashlib', 'posix', 
> 'encodings.aliases', 'matplotlib.fontconfig_pattern', 'exceptions', 
> 'xml.sax._exceptions', 'pytz.bisect', 'distutils.distutils', 'copy_reg', 
> 'sre_compile', 'xml.sax', '_hashlib', '_random', 'pytz.struct', 'site', 
> '__main__', 'shutil', 'matplotlib.weakref', 'strop', 'encodings.codecs', 
> 'gettext', 'matplotlib.rcsetup', 'pytz.sets', 'xml.sax.codecs', 'stat', 
> '_ssl', 'warnings', 'encodings.types', 'encodings.ascii', 'sets', 'sys', 
> 'xml.sax.sys', 'os.path', 'pytz.gettext', 'matplotlib.distutils', 
> '_weakref', 'distutils.errors', 'urlparse', 'linecache', 
> 'matplotlib.shutil', 'time']
> numerix numpy 1.0.4
> Using fontManager instance from 
> /home/paulsimon/.matplotlib/fontManager.cache
> 
> The plot output took me a lot of time to work out, which I enjoyed, and 
> the output is dazzling!
> 
> Paul Simon
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Paul S. <ps...@so...> - 2009年06月25日 19:13:30
Hi Sandro,
There is no image output when the script is run from cron. I think that is 
what you are asking.
I thought about updating matplotlib but at this point don't want to change 
versions unless all else fails. I"m running Mandriva 2008.1 and it's a lot 
of work.
Is there a more detailed way I can debug to find out where the failure is?
Paul
----- Original Message ----- 
From: "Sandro Tosi" <mat...@gm...>
To: "Paul Simon" <ps...@so...>
Cc: <mat...@li...>
Sent: Thursday, June 25, 2009 12:00 PM
Subject: Re: [Matplotlib-users] Running matplotlib job with cron
> Hello Paul,
>
> On Thu, Jun 25, 2009 at 19:13, Paul Simon<ps...@so...> wrote:
>> I've written my first python script with matplotlib, which works fine at 
>> the
>> command line but not with cron. It's quite puzzling to me, and probably
>> involves some path declaration that I don't know about.
>
> I may have read the mail fast, but I can't see any notice about if the
> image outputs are different (other than the textual outputs).
>
>> matplotlib version 0.91.2
>
> You might also want to update: matplotlib latest release is 0.98.5.3
>
> Regards,
> -- 
> Sandro Tosi (aka morph, morpheus, matrixhasu)
> My website: http://matrixhasu.altervista.org/
> Me at Debian: http://wiki.debian.org/SandroTosi
>
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Sandro T. <mat...@gm...> - 2009年06月25日 19:01:17
Hello Paul,
On Thu, Jun 25, 2009 at 19:13, Paul Simon<ps...@so...> wrote:
> I've written my first python script with matplotlib, which works fine at the
> command line but not with cron. It's quite puzzling to me, and probably
> involves some path declaration that I don't know about.
I may have read the mail fast, but I can't see any notice about if the
image outputs are different (other than the textual outputs).
> matplotlib version 0.91.2
You might also want to update: matplotlib latest release is 0.98.5.3
Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
From: Alexandar H. <vio...@gm...> - 2009年06月25日 18:50:02
Does this code work for anyone else?
import numpy as np
import matplotlib.cm as cm
import matplotlib.pyplot as plt
n = 100000
x = np.random.standard_normal(n)
y = 2.0 + 3.0 * x + 4.0 * np.random.standard_normal(n)
xmin = x.min()
xmax = x.max()
ymin = y.min()
ymax = y.max()
plt.hexbin(x,y, cmap=cm.jet, gridsize=(50,50), extent=[-2,2,-10,10])
plt.axis([xmin, xmax, ymin, ymax])
plt.title("Hexagon binning")
cb = plt.colorbar()
cb.set_label('counts')
plt.show()
Without the extent option, I get the expected plot of all the data. But,
what I'd like is to trim out some of the empty regions. If I just reset
xmin, xmax, etc. the binning of the data still occurs over the entire range
of the data in x and y, although the plot is correct, but the plot doesn't
have the desired 50x50 bins. With the "extent" option I get these errors:
Traceback (most recent call last):
 File "HexBin.py", line 23, in <module>
 plt.hexbin(x,y, cmap=cm.jet, extent=[-2,2,-10,10])
 File "/usr/lib64/python2.5/site-packages/matplotlib/pyplot.py", line 1920,
in hexbin
 ret = gca().hexbin(*args, **kwargs)
 File "/usr/lib64/python2.5/site-packages/matplotlib/axes.py", line 5447,
in hexbin
 collection.update(kwargs)
 File "/usr/lib64/python2.5/site-packages/matplotlib/artist.py", line 548,
in update
 raise AttributeError('Unknown property %s'%k)
AttributeError: Unknown property extent
Best,
Alex
On Thu, Jun 18, 2009 at 11:27 AM, Alexandar Hansen <vio...@gm...>wrote:
> Ok, fair enough. Let's use that:
>
> ------------------
> import numpy as np
> import matplotlib.cm as cm
> import matplotlib.pyplot as plt
>
> n = 100000
> x = np.random.standard_normal(n)
> y = 2.0 + 3.0 * x + 4.0 * np.random.standard_normal(n)
> xmin = x.min()
> xmax = x.max()
> ymin = y.min()
> ymax = y.max()
>
> plt.hexbin(x,y, cmap=cm.jet, gridsize=(50,50), extent=[-2,2,-10,10])
> plt.axis([xmin, xmax, ymin, ymax])
> plt.title("Hexagon binning")
> cb = plt.colorbar()
> cb.set_label('counts')
>
>
> plt.show()
> ----------------------
>
>
> I trimmed this from the example, which works fine. Without the extent
> option, I get the expected plot of all the data. But, what I'd like is to
> trim out some of the empty regions. If I just reset xmin, xmax, etc. the
> binning of the data still occurs over the entire range of the data in x and
> y, although the plot is correct, but the plot doesn't have the desired 50x50
> bins. With the "extent" option I get these errors:
>
>
> Traceback (most recent call last):
> File "HexBin.py", line 23, in <module>
> plt.hexbin(x,y, cmap=cm.jet, extent=[-2,2,-10,10])
> File "/usr/lib64/python2.5/site-packages/matplotlib/pyplot.py", line
> 1920, in hexbin
> ret = gca().hexbin(*args, **kwargs)
> File "/usr/lib64/python2.5/site-packages/matplotlib/axes.py", line 5447,
> in hexbin
> collection.update(kwargs)
> File "/usr/lib64/python2.5/site-packages/matplotlib/artist.py", line 548,
> in update
> raise AttributeError('Unknown property %s'%k)
> AttributeError: Unknown property extent
>
>
> The same thing as before. It doesn't know what 'extent' is for some reason.
> Or, perhaps more accurately, hexbin knows what it is but artist.py doesn't?
> The only "solution" i've come up with is to trim the original data that I
> input, but that is far from ideal.
>
>
> Best,
>
> Alex
>
>
>
>
>
>
>
> On Wed, Jun 17, 2009 at 7:50 PM, John Hunter <jd...@gm...> wrote:
>
>> On Wed, Jun 17, 2009 at 5:31 PM, Alexandar Hansen<vio...@gm...>
>> wrote:
>> > Hello,
>> >
>> > I've been having fun using hexbin, but I'd like to have consistent bin
>> sizes
>> > and plot ranges for different sets of data. What I'm finding is that the
>> bin
>> > sizes are primarily determined by the input data mins and maxes. For
>> > instance, I'm plotting data with something like:
>>
>> Instead of a "something like" could you please post a complete example
>> that we can run so we can replicate the error. This saves us a lot of
>> time. Also, please report any version info, as described at
>>
>>
>> http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a-problem
>>
>> For example, the following runs for me using mpl svn:
>>
>> import numpy as np
>> import matplotlib.cm as cm
>> import matplotlib.pyplot as plt
>>
>> n = 100000
>> x = np.random.standard_normal(n)
>> y = 2.0 + 3.0 * x + 4.0 * np.random.standard_normal(n)
>> xmin = x.min()
>> xmax = x.max()
>> ymin = y.min()
>> ymax = y.max()
>>
>> plt.subplots_adjust(hspace=0.5)
>> plt.subplot(121)
>> plt.hexbin(x,y, cmap=cm.jet, extent=[xmin, xmax, ymin, ymax])
>> plt.axis([xmin, xmax, ymin, ymax])
>> plt.title("Hexagon binning")
>> cb = plt.colorbar()
>> cb.set_label('counts')
>>
>> plt.subplot(122)
>> plt.hexbin(x,y,bins='log', cmap=cm.jet)
>> plt.axis([xmin, xmax, ymin, ymax])
>> plt.title("With a log color scale")
>> cb = plt.colorbar()
>> cb.set_label('log10(N)')
>>
>> plt.show()
>>
>
>
From: Paul_J_R <99k...@he...> - 2009年06月25日 17:48:02
I am trying to display an image with coordinates from a worldfile so that i
can plot GPS points on it later, but after i make the transformation the
axes coordinates are unchanged and the y axis is upside down.
My code so far is this:
fig=plt.figure()
ax=fig.add_subplot(2,1,1)
img=imread('imgpath')
file1=file(r'imgpath')
transValList=[]
for eachline in file1:
 transValList.append(eachline)
t=tsf.Affine2D.from_values(transValList[0],transValList[1],transValList[2],transValList[3],transValList[4],transValList[5])
ax.imshow(img, transform=t)
fig.show()
Any suggestions as to what is going on?
-- 
View this message in context: http://www.nabble.com/transformation-coordinates-not-correct-tp24207983p24207983.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Paul S. <ps...@so...> - 2009年06月25日 17:13:58
I've written my first python script with matplotlib, which works fine at the command line but not with cron. It's quite puzzling to me, and probably involves some path declaration that I don't know about.
#plot data from automate.csv
import matplotlib
import datetime
import numpy
from matplotlib import legend
from matplotlib.pyplot import figure, show, plot_date, setp, ylabel, savefig, xlabel
from matplotlib.dates import DayLocator, HourLocator, DateLocator, DateFormatter,drange, MinuteLocator, date2num, num2date
from matplotlib.mlab import csv2rec
from matplotlib.ticker import *
newr = csv2rec('/home/paulsimon/Documents/automate.csv')
x = date2num(newr.field(0))
fig = figure()
ax1 = fig.add_subplot(111)
line1, = ax1.plot_date(newr['dattim'], newr['bench_1'], '-r',label = 'bench 1')
line2, = ax1.plot_date(newr['dattim'], newr['bench_2'], '-b', label = 'bench 2')
line3, = ax1.plot_date(newr['dattim'], newr['eave'],'-k', label = 'eave')
line4, = ax1.plot_date(newr['dattim'], newr['outside'], '-g', label = 'outside')
ylabel('temperature')
xlabel(r'time/date')
hours = HourLocator(range(0,26,4))
dateformatter = DateFormatter('%I:%M %p\n%m/%d/%y')
ax1.xaxis.set_major_formatter(dateformatter)
ax1.xaxis.set_major_locator(hours)
ax1.set_ylim(30,100)
# Rotate x labels
for label in ax1.xaxis.get_ticklabels():
 label.set_fontsize(8)
ax1.grid(True)
ax1.xaxis.grid(False)
yminorLocator = MultipleLocator(5)
ax1.yaxis.set_minor_locator(yminorLocator)
ax1.yaxis.grid(True,which='major', linestyle ='-')
ax1.yaxis.grid(True,which='minor',linestyle = ':')
leg = ax1.legend(('bench 1', 'bench 2', ' eave', 'outside'), 'lower right', shadow = True)
for t in leg.get_texts():
 t.set_fontsize('small')
 
savefig('/home/paulsimon/python_scripts/image.png', format = 'png')
Running with --debug option, here are the two different output files:
$HOME=/home/paulsimon
CONFIGDIR=/home/paulsimon/.matplotlib
matplotlib data path /usr/lib/python2.5/site-packages/matplotlib/mpl-data
loaded rc file /usr/lib/python2.5/site-packages/matplotlib/mpl-data/matplotlibrc
matplotlib version 0.91.2
verbose.level debug
interactive is False
units is False
platform is linux2
loaded modules: ['_bisect', 'xml.sax.urlparse', 'distutils', 'matplotlib.matplotlib', 'datetime', 'matplotlib.tempfile', 'distutils.sysconfig', 'encodings.encodings', 'pytz.cStringIO', 'xml', 'distutils.dep_util', 'struct', 'tempfile', 'xml.sax.urllib', 'imp', '_struct', 'pytz.os', 'zipimport', 'string', 'encodings.utf_8', 'matplotlib.__future__', 'pytz.tzinfo', 'pytz.datetime', 'distutils.re', 'bisect', 'signal', 'random', 'xml.sax.xmlreader', 'matplotlib.pytz', 'distutils.log', 'pytz.tzfile', 'cStringIO', 'pkgutil', 'locale', 'xml.sax.saxutils', 'encodings', 'dateutil', 'matplotlib.warnings', 'matplotlib.string', 'pytz.pytz', 'urllib', 'matplotlib.sys', 're', 'new', 'math', 'fcntl', 'UserDict', 'distutils.os', 'matplotlib', 'codecs', 'md5', '_locale', 'matplotlib.sre_constants', 'matplotlib.os', 'thread', 'pkg_resources', 'weakref', 'itertools', 'distutils.spawn', 'distutils.sys', 'os', 'sre_parse', '__future__', 'matplotlib.copy', 'xml.sax.types', '_sre', '__builtin__', 'matplotlib.re', 'operator', 'distutils.util', 'distutils.string', 'matplotlib.datetime', 'posixpath', 'errno', '_socket', 'binascii', 'sre_constants', 'matplotlib.md5', 'types', 'pytz.sys', 'xml.sax.handler', 'pytz.pkg_resources', 'xml.sax.os', 'matplotlib.xml', '_codecs', 'pytz', 'matplotlib.pyparsing', 'copy', 'socket', '_types', 'matplotlib.dateutil', 'hashlib', 'posix', 'encodings.aliases', 'matplotlib.fontconfig_pattern', 'exceptions', 'xml.sax._exceptions', 'pytz.bisect', 'distutils.distutils', 'copy_reg', 'sre_compile', 'xml.sax', '_hashlib', '_random', 'pytz.struct', 'site', '__main__', 'shutil', 'matplotlib.weakref', 'strop', 'encodings.codecs', 'gettext', 'matplotlib.rcsetup', 'pytz.sets', 'xml.sax.codecs', 'stat', '_ssl', 'warnings', 'encodings.types', 'sets', 'sys', 'xml.sax.sys', 'os.path', 'pytz.gettext', 'matplotlib.distutils', '_weakref', 'distutils.errors', 'urlparse', 'linecache', 'matplotlib.shutil', 'time']
Using fontManager instance from /home/paulsimon/.matplotlib/fontManager.cache
numerix numpy 1.0.4
backend GTKAgg version 2.12.1
 findfont found Bitstream Vera Sans, normal, normal 400, normal, 8.0
findfont returning /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
 findfont found Bitstream Vera Sans, normal, normal 400, normal, 8.0
findfont returning /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
 findfont found Bitstream Vera Sans, normal, normal 400, normal, 8.0
... 
findfont returning /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
 findfont found Bitstream Vera Sans, normal, normal 400, normal, 9.996
findfont returning /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
And this is the output file (complete) running under cron:
$HOME=/home/paulsimon
CONFIGDIR=/home/paulsimon/.matplotlib
matplotlib data path /usr/lib/python2.5/site-packages/matplotlib/mpl-data
loaded rc file /usr/lib/python2.5/site-packages/matplotlib/mpl-data/matplotlibrc
matplotlib version 0.91.2
verbose.level debug
interactive is False
units is False
platform is linux2
loaded modules: ['_bisect', 'xml.sax.urlparse', 'distutils', 'matplotlib.matplotlib', 'datetime', 'matplotlib.tempfile', 'distutils.sysconfig', 'encodings.encodings', 'pytz.cStringIO', 'xml', 'distutils.dep_util', 'struct', 'tempfile', 'xml.sax.urllib', 'imp', '_struct', 'pytz.os', 'zipimport', 'string', 'matplotlib.__future__', 'pytz.tzinfo', 'pytz.datetime', 'distutils.re', 'bisect', 'signal', 'random', 'xml.sax.xmlreader', 'matplotlib.pytz', 'distutils.log', 'pytz.tzfile', 'cStringIO', 'pkgutil', 'locale', 'xml.sax.saxutils', 'encodings', 'dateutil', 'matplotlib.warnings', 'matplotlib.string', 'pytz.pytz', 'urllib', 'matplotlib.sys', 're', 'new', 'math', 'fcntl', 'UserDict', 'distutils.os', 'matplotlib', 'codecs', 'md5', '_locale', 'matplotlib.sre_constants', 'matplotlib.os', 'thread', 'pkg_resources', 'weakref', 'itertools', 'distutils.spawn', 'distutils.sys', 'os', 'sre_parse', '__future__', 'matplotlib.copy', 'xml.sax.types', '_sre', '__builtin__', 'matplotlib.re', 'operator', 'distutils.util', 'distutils.string', 'matplotlib.datetime', 'posixpath', 'errno', '_socket', 'binascii', 'sre_constants', 'matplotlib.md5', 'types', 'pytz.sys', 'xml.sax.handler', 'pytz.pkg_resources', 'xml.sax.os', 'matplotlib.xml', '_codecs', 'pytz', 'matplotlib.pyparsing', 'copy', 'socket', '_types', 'matplotlib.dateutil', 'hashlib', 'posix', 'encodings.aliases', 'matplotlib.fontconfig_pattern', 'exceptions', 'xml.sax._exceptions', 'pytz.bisect', 'distutils.distutils', 'copy_reg', 'sre_compile', 'xml.sax', '_hashlib', '_random', 'pytz.struct', 'site', '__main__', 'shutil', 'matplotlib.weakref', 'strop', 'encodings.codecs', 'gettext', 'matplotlib.rcsetup', 'pytz.sets', 'xml.sax.codecs', 'stat', '_ssl', 'warnings', 'encodings.types', 'encodings.ascii', 'sets', 'sys', 'xml.sax.sys', 'os.path', 'pytz.gettext', 'matplotlib.distutils', '_weakref', 'distutils.errors', 'urlparse', 'linecache', 'matplotlib.shutil', 'time']
numerix numpy 1.0.4
Using fontManager instance from /home/paulsimon/.matplotlib/fontManager.cache
The plot output took me a lot of time to work out, which I enjoyed, and the output is dazzling!
Paul Simon
From: Uma S <uma...@gm...> - 2009年06月25日 05:37:03
Hi,
I have the same problem. If you found the solution could you please post?
Thanks
uma
Yves-Alexandre wrote:
> 
> Hi,
> 
> I'm trying to add label to a histogram with multiple data. The doc says 
> "label can also be a sequence of strings" but when I try:
> 
> plt.hist([listA, listB, listC], bins=25, histtype='bar', 
> alpha=0.75,rwidth=0.85,label=['A','B','C'])
> 
> I got an error:
> "AttributeError: 'tuple' object has no attribute 'startswith'"
> (for the entire traceback see http://paste.pocoo.org/show/119820/ )
> 
> is it me or a bug?
> 
> Can I add a legend in another way?
> 
> thanks in advance!
> 
> -Yva.
> 
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
> is a gathering of tech-side developers & brand creativity professionals.
> Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, & 
> iPhoneDevCamp as they present alongside digital heavyweights like
> Barbarian 
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://www.nabble.com/Histogram-with-multiple-data-tp23787422p24197283.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Christoph G. <cg...@uc...> - 2009年06月25日 03:47:28
Hi,
I have built SVN revision 7239 of matplotlib and basemap for Python 2.6 
using Visual Studio 2008 and the geos 3.0.4 library. Seems to work for me.
http://www.lfd.uci.edu/~gohlke/#pythonlibs
Christoph
From: Art <gre...@gm...> - 2009年06月24日 20:28:16
Thanks! I knew it had to exist and with a lot of nice options, as usual.
Art
On Wed, Jun 24, 2009 at 10:21 PM, Jae-Joon Lee <lee...@gm...> wrote:
> I guess the stem plot is close to what you need.
>
> http://matplotlib.sourceforge.net/examples/pylab_examples/stem_plot.html
>
> Regards,
>
> -JJ
>
>
>
>
> On Wed, Jun 24, 2009 at 3:32 PM, Art<gre...@gm...> wrote:
> > Hi Eric,
> >
> > I was thinking more like the tiny attachment (hope attachments are ok).
> > Basically, given a list of (x,y) coordinates, plot the (x,y) point as a
> > little circle and drop a line down from the point to the x-axis (but not
> > fill the whole region under the plot).
> >
> > It's very nice for plotting a sparse signal, where most of the y's are
> equal
> > to zero but some are not.
> >
> > Thanks,
> > Art.
> >
> > On Wed, Jun 24, 2009 at 7:18 PM, Eric Firing <ef...@ha...> wrote:
> >>
> >> Art wrote:
> >>>
> >>> Is there a way to create a line plot similar to Mathematica's
> >>> PlotFilling->Axis option for ListPlot?
> >>>
> >>
> >> Like this?
> >>
> >>
> >>
> http://matplotlib.sourceforge.net/examples/pylab_examples/fill_between_demo.html
> >>
> >> Eric
> >>>
> >>> It is a plot of a vector as a line plot, but for each point, there is a
> >>> vertical line dropped down to the axis. It is demonstrated on the
> following
> >>> link:
> >>>
> >>> http://reference.wolfram.com/mathematica/ref/Filling.html
> >>>
> >>> With the example given:
> >>>
> >>> ListPlot[Table[{k,
> >>> PDF[BinomialDistribution[50, p], k]}, {p, {0.3, 0.5, 0.8}}, {k, 0,
> >>> 50}], Filling -> Axis]
> >>>
> >>> Thanks!
> >>>
> >>>
> >>>
> ------------------------------------------------------------------------
> >>>
> >>>
> >>>
> ------------------------------------------------------------------------------
> >>>
> >>>
> >>>
> ------------------------------------------------------------------------
> >>>
> >>> _______________________________________________
> >>> Matplotlib-users mailing list
> >>> Mat...@li...
> >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >>
> >
> >
> >
> ------------------------------------------------------------------------------
> >
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
>
From: Jae-Joon L. <lee...@gm...> - 2009年06月24日 20:23:07
I guess the stem plot is close to what you need.
http://matplotlib.sourceforge.net/examples/pylab_examples/stem_plot.html
Regards,
-JJ
On Wed, Jun 24, 2009 at 3:32 PM, Art<gre...@gm...> wrote:
> Hi Eric,
>
> I was thinking more like the tiny attachment (hope attachments are ok).
> Basically, given a list of (x,y) coordinates, plot the (x,y) point as a
> little circle and drop a line down from the point to the x-axis (but not
> fill the whole region under the plot).
>
> It's very nice for plotting a sparse signal, where most of the y's are equal
> to zero but some are not.
>
> Thanks,
> Art.
>
> On Wed, Jun 24, 2009 at 7:18 PM, Eric Firing <ef...@ha...> wrote:
>>
>> Art wrote:
>>>
>>> Is there a way to create a line plot similar to Mathematica's
>>> PlotFilling->Axis option for ListPlot?
>>>
>>
>> Like this?
>>
>>
>> http://matplotlib.sourceforge.net/examples/pylab_examples/fill_between_demo.html
>>
>> Eric
>>>
>>> It is a plot of a vector as a line plot, but for each point, there is a
>>> vertical line dropped down to the axis. It is demonstrated on the following
>>> link:
>>>
>>> http://reference.wolfram.com/mathematica/ref/Filling.html
>>>
>>> With the example given:
>>>
>>> ListPlot[Table[{k,
>>>  PDF[BinomialDistribution[50, p], k]}, {p, {0.3, 0.5, 0.8}}, {k, 0,
>>>  50}], Filling -> Axis]
>>>
>>> Thanks!
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Jack Yu <jac...@go...> - 2009年06月24日 20:08:04
Hi everyone,
I am trying to install the latest version of matplotlib from svn. However,
after cd-ing into the matplotlib directory, and running "python setup.py
install --prefix=${path}", I get the following error:
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
error: command 'c++' failed with exit status 1
I don't really understand what I need to do from this error message. Does
it mean that I have to install 'zlib'? I am using python 2.4.3, and numpy
1.2.1.
Thanks,
Jack
From: guillaume r. <gra...@wy...> - 2009年06月24日 20:07:56
Hi list :)
I'm having troubles with windows vista and the wxpython toolbar.
it works fine on linux (not tested on any other windows//mac os)
I just see a gray bar where the toolbar should be.
I do something like this:
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as
FigureCanvas
from matplotlib.figure import Figure
 self.fig=Figure(figsize=(width, height),dpi=dpi)
 self.canvas = FigureCanvas(parent,-1,self.fig)
 self.toolbar = NavigationToolbar2Wx(self.canvas)
 self.toolbar.Realize()
 self.SetToolBar(self.toolbar)
 self.toolbar.update()
(I can paste more code if relevant)
I'm wondering what I'm doing wrong?
----
This message contains confidential information and may contain information that is legally privileged. If you have received this message by mistake, please immediately notify us and delete the original message. Thank you. 
Ce message contient des informations confidentielles. S'il vous est parvenu par erreur, merci de bien vouloir nous en aviser par retour, de n'en faire aucun usage et de n'en garder aucune copie.
----
From: Gökhan S. <gok...@gm...> - 2009年06月24日 17:47:03
On Wed, Jun 24, 2009 at 12:31 PM, Nils Wagner
<nw...@ia...>wrote:
>
>
>>
>> Could you please share your findings? I would also like to learn how to
>> script Blender once I start get going on Gimp.
>>
> Finally I made it. Please find enclosed a solution.
>
> Cheers,
>
> Nils
>
Hey Nils,
With a minute modification I have mad it work here, too. "gimp_version ==
2.6.6"
Can't we directly access python-fu scripts without using that scm file? To
me it seems easier in this way. However still don't know how to externally
access python-fu.
Thanks for sharing your results.
Gökhan
From: Nils W. <nw...@ia...> - 2009年06月24日 17:32:08
 
> 
> Could you please share your findings? I would also like 
>to learn how to
> script Blender once I start get going on Gimp.
 
Finally I made it. Please find enclosed a solution.
Cheers,
 Nils
From: Eric F. <ef...@ha...> - 2009年06月24日 17:18:52
Art wrote:
> Is there a way to create a line plot similar to Mathematica's 
> PlotFilling->Axis option for ListPlot?
> 
Like this?
http://matplotlib.sourceforge.net/examples/pylab_examples/fill_between_demo.html
Eric
> It is a plot of a vector as a line plot, but for each point, there is a 
> vertical line dropped down to the axis. It is demonstrated on the 
> following link:
> 
> http://reference.wolfram.com/mathematica/ref/Filling.html
> 
> With the example given:
> 
> ListPlot[Table[{k,
> PDF[BinomialDistribution[50, p], k]}, {p, {0.3, 0.5, 0.8}}, {k, 0,
> 50}], Filling -> Axis]
> 
> Thanks!
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Marcin K. <mr...@gm...> - 2009年06月24日 16:40:44
Hello everyone,
Can't I set programmatically the home dir of Matplotlib by some function 
call of Matplotlib?
I'm sorry, but using environment variable is a bad design in web apps 
context: suppose several apps run in Apache virtual hosts, under *the 
same* user and they use Matplotlib. In consequence they all have to 
write to the same .matplotlib dir!
Regards,
mk
8 messages has been excluded from this view by a project administrator.

Showing results of 383

<< < 1 2 3 4 5 .. 16 > >> (Page 3 of 16)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /