[Matplotlib-users] Yticks off?
I am making a bar chart and want to turn off (visible) yticks. How can I remove, hide, color with white (the background color), etc., the yticks? Thanks, -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] more demos of mpl with wxPython
On Fri, Aug 1, 2008 at 12:43 PM, eliben [EMAIL PROTECTED] wrote: Alan G Isaac wrote: On Fri, 1 Aug 2008, eliben apparently wrote: I wouldn't imagine anyone would hesitate borrowing code from a demo because of a lack of license. It depends on what you mean by lack of a license. I think what most people (myself included) would like to see for a demo script is this file is in the public domain. That is not exactly a license, but it roughly means use this however you want without worrying about any restrictions, not even attribution requirements. I do not think the LGPL generally makes sense (literally) for such scripts: http://www.gnu.org/licenses/lgpl.html If public domain is uncomfortable, then perhaps MIT or BSD would be comfortable. URL:http://www.opensource.org/licenses/mit-license.html Of course, s/he who has the copyright chooses the license. Cheers, Alan Isaac Although we're markedly off-topic here, I want to mention that I've battled with the question of licensing my code. It's documented here: http://eli.thegreenplace.net/2006/04/13/choosing-an-open-source-license-for-my-code/ The choice of LGPL eventually stems from my desire to promote free software, and prevent abuse. True, for demos it makes less sense than for full-blown libraries, but still... Consider this: the demo teaches someone how to make some interface/code work. He got it for free, because I've placed my demo publicly online. But he may want to incorporate it in his program, and hide from his users how he does the thing the demo taught him, winning a competitive advantage. This isn't fair, and LGPL prevents such use, while in general allowing one to use the code in commercial applications. My understanding of what can and cannot be licensed, at least in U.S. law and (as far as I know) some other areas as well, is that what you are trying to guard is something you cannot guard unless you get a patent. The specific text of a program, its concrete form, and perhaps other concrete implementation features are covered (or at least can be covered) by copyright. Knowledge, including how he does the thing the demo taught him, is not subject to copyright. That is, if he legally reads your code, and clones functionality, there is no way barring a software patent that you can restrict this. I personally regard viral licenses with caution: that is, if the copyright says, Don't build on or extend this unless you want your work to be covered by my chosen license, I will be extremely cautious about building off of them. Under the LGPV, if I incorporate one of your demos into my own 2000 line program, your requirements of fairness require me to place my entire 2000 line program under the terms of the license you chose. This is a significant deterrent to some programmers. Eli -- View this message in context: http://www.nabble.com/more-demos-of-mpl-with-wxPython-tp18770262p18779533.html Sent from the matplotlib - users mailing list archive at Nabble.com. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Thin wedges missing from pie graph
I deleted the matplotlib directory (there was one at the path you provided) and reinstalled 0.91.2; the behavior was identical. On Fri, Aug 1, 2008 at 7:49 AM, Michael Droettboom [EMAIL PROTECTED] wrote: Hmmm... The puzzling thing is that 0.91.2 works for me with the example you provided. Can you try clearing out the installation directory (usually /usr/lib/python2.5/site-packages/matplotlib/) and trying again? Cheers, Mike Jonathan Hayward, http://JonathansCorner.com; wrote: Thanks; will do. On Thu, Jul 31, 2008 at 3:45 PM, John Hunter [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: On Thu, Jul 31, 2008 at 3:09 PM, Jonathan Hayward, http://JonathansCorner.com [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I emerged 0.91.2 through my distribution's packaging system. Do I need to compile the newest version from source or something like that? The 0.98.3 release will be out very soon -- just keep your eyes out for an announcement on this list. JDH -- -- Jonathan Hayward, [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Crash on import with CGI wrapped by PHP--unhappy with .matplotlib directory?
I have a PHP script which authenticates a user and I am trying to get the PHP script to wrap a Python script using matplotlib. As it is, the script mostly works when invoked from the command line or as its own CGI script. When I call it from a PHP script, it doesn't produce output, and testing found that when I call a Python script from a PHP script, output works before but not after import matplotlib: if the PHP script calls a script of: #!/usr/bin/python print Before import matplotlib. import matplotlib; print After import matplotlib. the first print statement succeeds but the second one fails; the server log shows a crash of: Before import matplotlib.Traceback (most recent call last): File /home/jhayward/bintmp/test.py, line 5, in module import matplotlib; File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 639, in module rcParams = rc_params() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 562, in rc_params fname = matplotlib_fname() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 513, in matplotlib_fname fname = os.path.join(get_configdir(), 'matplotlibrc') File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 207, in wrapper ret = func(*args, **kwargs) File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 403, in _get_configdir raise RuntimeError(Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data%h) RuntimeError: Failed to create /root/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data I think this error is somewhat misleading; it persisted after I ran a chmod -R 1777 /root/.matplotlib. What is the proper way to adjust things so matplotlib will be happy with its .matplotlib directory? -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Crash on import with CGI wrapped by PHP--unhappy with .matplotlib directory?
Tried that and reran it; I'm getting substantially the same stacktrace: File /home/jhayward/bintmp/test.py, line 5, in module import matplotlib; File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 639, in module rcParams = rc_params() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 562, in rc_params fname = matplotlib_fname() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 513, in matplotlib_fname fname = os.path.join(get_configdir(), 'matplotlibrc') File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 207, in wrapper ret = func(*args, **kwargs) File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 403, in _get_configdir raise RuntimeError(Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data%h) RuntimeError: Failed to create /root/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data It's /path/matplotlibrc and not /path/.matplotlibrc or anything like that? On Fri, Aug 1, 2008 at 10:51 AM, Michael Droettboom [EMAIL PROTECTED] wrote: Just throwing out a suggestion here: You could try putting a matplotlibrc file in the same directory as your Python script -- it will use that instead of the one in ~/.matplotlib. Cheers, Mike Jonathan Hayward, http://JonathansCorner.com; wrote: I have a PHP script which authenticates a user and I am trying to get the PHP script to wrap a Python script using matplotlib. As it is, the script mostly works when invoked from the command line or as its own CGI script. When I call it from a PHP script, it doesn't produce output, and testing found that when I call a Python script from a PHP script, output works before but not after import matplotlib: if the PHP script calls a script of: #!/usr/bin/python print Before import matplotlib. import matplotlib; print After import matplotlib. the first print statement succeeds but the second one fails; the server log shows a crash of: Before import matplotlib.Traceback (most recent call last): File /home/jhayward/bintmp/test.py, line 5, in module import matplotlib; File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 639, in module rcParams = rc_params() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 562, in rc_params fname = matplotlib_fname() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 513, in matplotlib_fname fname = os.path.join(get_configdir(), 'matplotlibrc') File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 207, in wrapper ret = func(*args, **kwargs) File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 403, in _get_configdir raise RuntimeError(Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data%h) RuntimeError: Failed to create /root/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data I think this error is somewhat misleading; it persisted after I ran a chmod -R 1777 /root/.matplotlib. What is the proper way to adjust things so matplotlib will be happy with its .matplotlib directory? -- -- Jonathan Hayward, [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com
Re: [Matplotlib-users] Crash on import with CGI wrapped by PHP--unhappy with .matplotlib directory?
I found a reason for the behavior: The script was running as user apache, but trying to open /root/.matplotlib, and /root was mode 0700. It stopped crashing on import after I made /root mode 0711. This is somewhat surprising behavior to me; shouldn't it be defaulting to something besides expected access to ~root? On Fri, Aug 1, 2008 at 11:38 AM, Jonathan Hayward, http://JonathansCorner.com [EMAIL PROTECTED] wrote: Tried that and reran it; I'm getting substantially the same stacktrace: File /home/jhayward/bintmp/test.py, line 5, in module import matplotlib; File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 639, in module rcParams = rc_params() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 562, in rc_params fname = matplotlib_fname() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 513, in matplotlib_fname fname = os.path.join(get_configdir(), 'matplotlibrc') File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 207, in wrapper ret = func(*args, **kwargs) File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 403, in _get_configdir raise RuntimeError(Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data%h) RuntimeError: Failed to create /root/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data It's /path/matplotlibrc and not /path/.matplotlibrc or anything like that? On Fri, Aug 1, 2008 at 10:51 AM, Michael Droettboom [EMAIL PROTECTED]wrote: Just throwing out a suggestion here: You could try putting a matplotlibrc file in the same directory as your Python script -- it will use that instead of the one in ~/.matplotlib. Cheers, Mike Jonathan Hayward, http://JonathansCorner.com; wrote: I have a PHP script which authenticates a user and I am trying to get the PHP script to wrap a Python script using matplotlib. As it is, the script mostly works when invoked from the command line or as its own CGI script. When I call it from a PHP script, it doesn't produce output, and testing found that when I call a Python script from a PHP script, output works before but not after import matplotlib: if the PHP script calls a script of: #!/usr/bin/python print Before import matplotlib. import matplotlib; print After import matplotlib. the first print statement succeeds but the second one fails; the server log shows a crash of: Before import matplotlib.Traceback (most recent call last): File /home/jhayward/bintmp/test.py, line 5, in module import matplotlib; File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 639, in module rcParams = rc_params() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 562, in rc_params fname = matplotlib_fname() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 513, in matplotlib_fname fname = os.path.join(get_configdir(), 'matplotlibrc') File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 207, in wrapper ret = func(*args, **kwargs) File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 403, in _get_configdir raise RuntimeError(Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data%h) RuntimeError: Failed to create /root/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data I think this error is somewhat misleading; it persisted after I ran a chmod -R 1777 /root/.matplotlib. What is the proper way to adjust things so matplotlib will be happy with its .matplotlib directory? -- -- Jonathan Hayward, [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science
Re: [Matplotlib-users] Crash on import with CGI wrapped by PHP--unhappy with .matplotlib directory?
I found a reason for the behavior: The script was running as user apache, but trying to open /root/.matplotlib, and /root was mode 0700. It stopped crashing on import after I made /root mode 0711. This is somewhat surprising behavior to me; shouldn't it be defaulting to something besides expected access to ~root? On Fri, Aug 1, 2008 at 11:38 AM, Jonathan Hayward, http://JonathansCorner.com [EMAIL PROTECTED] wrote: Tried that and reran it; I'm getting substantially the same stacktrace: File /home/jhayward/bintmp/test.py, line 5, in module import matplotlib; File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 639, in module rcParams = rc_params() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 562, in rc_params fname = matplotlib_fname() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 513, in matplotlib_fname fname = os.path.join(get_configdir(), 'matplotlibrc') File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 207, in wrapper ret = func(*args, **kwargs) File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 403, in _get_configdir raise RuntimeError(Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data%h) RuntimeError: Failed to create /root/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data It's /path/matplotlibrc and not /path/.matplotlibrc or anything like that? On Fri, Aug 1, 2008 at 10:51 AM, Michael Droettboom [EMAIL PROTECTED]wrote: Just throwing out a suggestion here: You could try putting a matplotlibrc file in the same directory as your Python script -- it will use that instead of the one in ~/.matplotlib. Cheers, Mike Jonathan Hayward, http://JonathansCorner.com; wrote: I have a PHP script which authenticates a user and I am trying to get the PHP script to wrap a Python script using matplotlib. As it is, the script mostly works when invoked from the command line or as its own CGI script. When I call it from a PHP script, it doesn't produce output, and testing found that when I call a Python script from a PHP script, output works before but not after import matplotlib: if the PHP script calls a script of: #!/usr/bin/python print Before import matplotlib. import matplotlib; print After import matplotlib. the first print statement succeeds but the second one fails; the server log shows a crash of: Before import matplotlib.Traceback (most recent call last): File /home/jhayward/bintmp/test.py, line 5, in module import matplotlib; File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 639, in module rcParams = rc_params() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 562, in rc_params fname = matplotlib_fname() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 513, in matplotlib_fname fname = os.path.join(get_configdir(), 'matplotlibrc') File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 207, in wrapper ret = func(*args, **kwargs) File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 403, in _get_configdir raise RuntimeError(Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data%h) RuntimeError: Failed to create /root/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data I think this error is somewhat misleading; it persisted after I ran a chmod -R 1777 /root/.matplotlib. What is the proper way to adjust things so matplotlib will be happy with its .matplotlib directory? -- -- Jonathan Hayward, [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science
Re: [Matplotlib-users] Crash on import with CGI wrapped by PHP--unhappy with .matplotlib directory?
User apache exists with home directory /var/www, which exists. On Fri, Aug 1, 2008 at 11:59 AM, Michael Droettboom [EMAIL PROTECTED] wrote: It's supposed to default to the current user's home directory. Perhaps apache doesn't have a home directory? Cheers, Mike Jonathan Hayward, http://JonathansCorner.com; wrote: I found a reason for the behavior: The script was running as user apache, but trying to open /root/.matplotlib, and /root was mode 0700. It stopped crashing on import after I made /root mode 0711. This is somewhat surprising behavior to me; shouldn't it be defaulting to something besides expected access to ~root? On Fri, Aug 1, 2008 at 11:38 AM, Jonathan Hayward, http://JonathansCorner.com [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Tried that and reran it; I'm getting substantially the same stacktrace: File /home/jhayward/bintmp/test.py, line 5, in module import matplotlib; File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 639, in module rcParams = rc_params() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 562, in rc_params fname = matplotlib_fname() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 513, in matplotlib_fname fname = os.path.join(get_configdir(), 'matplotlibrc') File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 207, in wrapper ret = func(*args, **kwargs) File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 403, in _get_configdir raise RuntimeError(Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data%h) RuntimeError: Failed to create /root/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data It's /path/matplotlibrc and not /path/.matplotlibrc or anything like that? On Fri, Aug 1, 2008 at 10:51 AM, Michael Droettboom [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Just throwing out a suggestion here: You could try putting a matplotlibrc file in the same directory as your Python script -- it will use that instead of the one in ~/.matplotlib. Cheers, Mike Jonathan Hayward, http://JonathansCorner.com; wrote: I have a PHP script which authenticates a user and I am trying to get the PHP script to wrap a Python script using matplotlib. As it is, the script mostly works when invoked from the command line or as its own CGI script. When I call it from a PHP script, it doesn't produce output, and testing found that when I call a Python script from a PHP script, output works before but not after import matplotlib: if the PHP script calls a script of: #!/usr/bin/python print Before import matplotlib. import matplotlib; print After import matplotlib. the first print statement succeeds but the second one fails; the server log shows a crash of: Before import matplotlib.Traceback (most recent call last): File /home/jhayward/bintmp/test.py, line 5, in module import matplotlib; File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 639, in module rcParams = rc_params() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 562, in rc_params fname = matplotlib_fname() File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 513, in matplotlib_fname fname = os.path.join(get_configdir(), 'matplotlibrc') File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 207, in wrapper ret = func(*args, **kwargs) File /usr/lib64/python2.5/site-packages/matplotlib/__init__.py, line 403, in _get_configdir raise RuntimeError(Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data%h) RuntimeError: Failed to create /root/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data I think this error is somewhat misleading; it persisted after I ran a chmod -R 1777 /root/.matplotlib. What is the proper way to adjust things so matplotlib will be happy with its .matplotlib directory? ---- Jonathan Hayward, [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED
Re: [Matplotlib-users] Thin wedges missing from pie graph
I emerged 0.91.2 through my distribution's packaging system. Do I need to compile the newest version from source or something like that? On Thu, Jul 31, 2008 at 3:06 PM, Michael Droettboom [EMAIL PROTECTED] wrote: Now that I'm seeing your image, it's jogged my memory that this bug has already been fixed on both our 0.91.x and 0.98.x branches. What version are you using? Cheers, Mike Jonathan Hayward, http://JonathansCorner.com; wrote: Yes; thank you; I've attached the script and the generated image. On Thu, Jul 31, 2008 at 10:04 AM, Michael Droettboom [EMAIL PROTECTED]mailto: [EMAIL PROTECTED] wrote: Can you provide a standalone script that reproduces this error? Cheers, Mike Jonathan Hayward, http://JonathansCorner.com; wrote: If there are one or more narrow wedges on a pie graph, narrow enough that the percentage values overlap and are hard to read, there seems to be a knife-thin missing wedge from the pie, including a break in the circumference. Is this configurable, even if it means that the border completely covers the colored interior of ultra-thin wedges? ---- Jonathan Hayward, [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net mailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users --Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA -- -- Jonathan Hayward, [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Thin wedges missing from pie graph
Thanks; will do. On Thu, Jul 31, 2008 at 3:45 PM, John Hunter [EMAIL PROTECTED] wrote: On Thu, Jul 31, 2008 at 3:09 PM, Jonathan Hayward, http://JonathansCorner.com [EMAIL PROTECTED] wrote: I emerged 0.91.2 through my distribution's packaging system. Do I need to compile the newest version from source or something like that? The 0.98.3 release will be out very soon -- just keep your eyes out for an announcement on this list. JDH -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Pie graph autopct format strings
How can I customize a pie graph autopct format string to display the value for one of the regions to a specified precision? If I have category A presenting $5.25, category B representing $1.30, and category C representing $2.00, how do I get the numeric value (not the label) displayed for category A to be $5.25 instead of NN.N%? -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Thin wedges missing from pie graph
If there are one or more narrow wedges on a pie graph, narrow enough that the percentage values overlap and are hard to read, there seems to be a knife-thin missing wedge from the pie, including a break in the circumference. Is this configurable, even if it means that the border completely covers the colored interior of ultra-thin wedges? -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Border appearance
Taking a step back: What should I be digging into so I'll have the concepts and tools to manipulate features like color and thickness of borders on a bar chart and on a pie graph and any parts that may have a border, whether the shadow on a pie graph is on the lower left or upper right, etc.? I'm looking at the tutorialhttp://matplotlib.sourceforge.net/tutorial.html; I'd welcome suggestions or clarifications about what I should be reading. On Tue, Jul 22, 2008 at 4:57 PM, John Hunter [EMAIL PROTECTED] wrote: On Tue, Jul 22, 2008 at 4:28 PM, Jonathan Hayward http://JonathansCorner.com [EMAIL PROTECTED] wrote: On the two routines I'm modifying from examples, boundaries and borders are generally a hefty black. How can I control color and/or thickness and/or turn off items like boundaries that are drawn in black? There are two borders in question, the figure border and the axes border. Both are rectangle instances. You can control the figure border with the figurePatch instance fig.figurePatch.set_edgecolor('white') fig.figurePatch.set_linewidth(0.5) and similarly for the axes axesFrame instance ax = axes([left, bottom, width, height]) ax.axesFrame.set_edgecolor('red') ax.axesFrame.set_linewidth(0.5) You can make the frame invisible in a few different ways: * set the edgecolor to be the same as the face color * set the linewidth to 0 * set the visible property to False (ax.axesFrame.set_visible(False)) JDH -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Border appearance
Thank you; on to digging... On Thu, Jul 24, 2008 at 10:29 AM, John Hunter [EMAIL PROTECTED] wrote: On Thu, Jul 24, 2008 at 10:22 AM, Jonathan Hayward http://JonathansCorner.com I'm looking at the tutorial ; I'd welcome suggestions or clarifications about what I should be reading. The tutorial is a good start, as is the user's guide http://matplotlib.sourceforge.net/users_guide_0.98.1.pdf some of the user's guide is dated, and the neww docs we are working on (still in beta) are at http://matplotlib.sourceforge.net/doc/html/index.html. The screenshots (http://matplotlib.sourceforge.net/screenshots.html) and examples (http://matplotlib.sourceforge.net/examples/) are good places to go for inspiration. You will probably also want to read the artist tutorial at http://matplotlib.sourceforge.net/doc/html/users/artists.html Good luck! JDH -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Tick marks around bar chart
How do I control and/or remove the black tick marks on a bar chart? I've turned off most of the other black material on boundaries, but these ones are still there (see attached image). -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com attachment: barchart.png- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Tick marks around bar chart
Thank you! On Thu, Jul 24, 2008 at 12:40 PM, John Hunter [EMAIL PROTECTED] wrote: On Thu, Jul 24, 2008 at 11:53 AM, Jonathan Hayward http://JonathansCorner.com [EMAIL PROTECTED] wrote: How do I control and/or remove the black tick marks on a bar chart? I've turned off most of the other black material on boundaries, but these ones are still there (see attached image). You can make the tick lines invisible like so for line in ax.get_xticklines() + ax.get_yticklines(): line.set_visible(False) This is presuming you want ticklabels but not lines. If you are willing to dispense with both, it is easier to simply ax.set_xticks([]) ax.set_yticks([]) The various properties of the tick are discussed at the end of the artist tutorial http://matplotlib.sourceforge.net/doc/html/users/artists.html JDH -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Scaling--I couldn't find it, but should this be in FAQ list?
On Tue, Jul 22, 2008 at 4:54 PM, John Hunter [EMAIL PROTECTED] wrote: On Tue, Jul 22, 2008 at 4:06 PM, Jonathan Hayward http://JonathansCorner.com [EMAIL PROTECTED] wrote: Thank you; I've shrunk the graphic part. Please respond to the mailing list (reply to all) Oops; sorry. When I save it as an image, it's painting an 800x600 image, so I've shrunk the portion of the 800x600 image I'm using. Is there a way to crop or do something comparable? Not sure I understand the question. You can control the figure size in pixels by setting the figure size in inches and the dpi -- the pixel size is the prodict of the two fig = figure((8,6), dpi=100) # 800x600 When I tried placing that line in a couple of places, I got an error: [EMAIL PROTECTED] ~/bin $ ./barchart Traceback (most recent call last): File ./barchart, line 6, in ? fig = figure((8,6), dpi=100) File /usr/lib/python2.4/site-packages/matplotlib/pyplot.py, line 186, in figure FigureClass=FigureClass, File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py, line 44, in new_figure_manager return FigureManagerGTKAgg(canvas, num) File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py, line 405, in __init__ self.window.set_title(Figure %d % num) TypeError: not all arguments converted during string formatting Are there other things it needs? (I tried placing a space so 8,6 would read 8, 6, but it didn't significantly change the error.) you can control the *relative* proportion of the axes by using the axes command as before ax = axes([left, bottom, width, height]) with these two, you should be able to get whatever size and proportions you want. JDH -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Border appearance
On Tue, Jul 22, 2008 at 4:57 PM, John Hunter [EMAIL PROTECTED] wrote: On Tue, Jul 22, 2008 at 4:28 PM, Jonathan Hayward http://JonathansCorner.com [EMAIL PROTECTED] wrote: On the two routines I'm modifying from examples, boundaries and borders are generally a hefty black. How can I control color and/or thickness and/or turn off items like boundaries that are drawn in black? There are two borders in question, the figure border and the axes border. Both are rectangle instances. You can control the figure border with the figurePatch instance How do I query/set the figure in question? I was specifying the axes earlier, and setting a linewidth of 0 seemed to remove one of two borders (or, from a non-technical perspective, made the border half as thick). See before.png and after.png: getting closer at least... fig.figurePatch.set_edgecolor('white') fig.figurePatch.set_linewidth(0.5) and similarly for the axes axesFrame instance ax = axes([left, bottom, width, height]) ax.axesFrame.set_edgecolor('red') ax.axesFrame.set_linewidth(0.5) You can make the frame invisible in a few different ways: * set the edgecolor to be the same as the face color * set the linewidth to 0 * set the visible property to False (ax.axesFrame.set_visible(False)) JDH -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com attachment: before.pngattachment: after.png- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] *Non-interactive* image generation?
I would like to use pylab in a CGI script that would generate a pie chart/bar graph/..., save it to a file, and then be able to output the image from the file. Everything that I've tried works if I run the script from my shell, but when it runs on my test box (or, for that matter, a sudo without an X display being set up), it gripes about not being able to open an X display. Is there a way to either: 1: Tell pylab to run without a display, 2: Configure a dummy display, or 3: Attach the web environment to a real display? I'm not having it display windows or asking for interesting X functionality--just generate a pie chart and save it as a file. -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Scaling--I couldn't find it, but should this be in FAQ list?
I'm tinkering with a modified version of http://matplotlib.sourceforge.net/screenshots/barchart_demo.py : # a bar plot with errorbars # a bar plot with errorbars from pylab import * N = 5 menMeans = (20, 35, 30, 35, 27) menStd = ( 2, 3, 4, 1, 2) ind = arange(N) # the x locations for the groups width = 0.35 # the width of the bars p1 = bar(ind, menMeans, width, color='r', yerr=menStd) womenMeans = (25, 32, 34, 20, 25) womenStd = ( 3, 5, 2, 3, 3) p2 = bar(ind+width, womenMeans, width, color='y', yerr=womenStd) ylabel('Scores') title('Scores by group and gender') xticks(ind+width, ('G1', 'G2', 'G3', 'G4', 'G5') ) xlim(-width,len(ind)) yticks(arange(0,41,10)) legend( (p1[0], p2[0]), ('Men', 'Women'), shadow=True) show() I would like to shrink the graph height to a third or a fourth of its present value, and possibly cut the padding. How can I control that? TIA, -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Border appearance
On the two routines I'm modifying from examples, boundaries and borders are generally a hefty black. How can I control color and/or thickness and/or turn off items like boundaries that are drawn in black? -- -- Jonathan Hayward, [EMAIL PROTECTED] ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users