[Matplotlib-users] is a changing background color possible?
matplotlib python: How do you change the background color of a line plot according to a given column? Say I have the following data file 1. 0 4. 0 2. 0 1. 1 2. 1 3. 1 3. 2 1. 2 2. 2 The first column represents the y-values, and the 2nd column should control the background color. Say, it plots the (black) line on a white-gray alternating background (zebra-like) as proceeding further in x-direction, where the transition in color occurs anytime the integer in the 2nd column increments. Or other possible solution: Use 2nd column as function argument to determine background color. How would one do this with matlibplot? Frank -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] List of matplotlib-using software for wikipedia
hello everyone, I would like to have a list of software, which uses matplotlib to extend the wikipedia in some other languages. do you have an idea where I could find such lists? thank you! -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib font in cairo
I've found a little work-a-round to get my custom font. Here it is: from ctypes import windll gdi32 = windll.gdi32 FR_PRIVATE = 0x10 gdi32.AddFontResourceExA(FILENAME_OF_TTF,FR_PRIVATE,0) greetz Frank Am 18.05.2010 16:09, schrieb Michael Droettboom: > We went through this a few years ago on the Cairo mailing list. > The short answer is you need to copy the fonts from mpl-data to > C:\Windows\Fonts to correctly use Cairo. > > The long answer: Cairo uses fontconfig for font lookup, which by default > searches the system font directory (C:\Windows\Fonts). There is an > fontconfig API to add another font directory to search, but it is not > exposed to Python. The cairo guys don't want to expose it in pycairo > because that API is not technically part of cairo, but there isn't a > proper Python wrapper to fontconfig, so until one is created we're sort > of left with our hands tied. > > This is probably worthy of a FAQ in the docs. > > Mike > > [email protected] wrote: >> Hallo, >> >> I'm try to use MathTextParser output for cairo in my wxpython gui. >> Works well under ubunutu linux (maybe dublicated font) but fails under >> windows (screenshot: >> http://www.ubuntu-pics.de/bild/62985/auswahl_017_RC86gk.png ). >> >> How to tell cairo to use the font file from mpl-data? >> >> Here some code: >> >> from matplotlib.mathtext import MathTextParser >> from matplotlib.font_manager import ttfFontProperty >> import wx >> import wx.lib.wxcairo >> import cairo >> >> #... >> MPC = MathTextParser("Cairo") >> dc = wx.BufferedPaintDC(self) >> ctx = wx.lib.wxcairo.ContextFromDC(dc) >> #... >> width, height, descent, glyphs, rects = >> self.mathtext_parser.parse(r"$a_0+a_1\xi+a_2\xi^2+a_3\xi^3$",dpi,prop) >> #... >> >> for font, fontsize, s, ox, oy in glyphs: >>#... >>fontProp = ttfFontProperty(font) >>#... >>ctx.select_font_face (fontProp.name, >> self.fontangles [fontProp.style], >> self.fontweights[fontProp.weight]) >> >>#... >>ctx.show_text(s.encode("utf-8")) >>#... >> #... >> >> greetz >> >> Frank >> >> -- >> >> >> ___ >> Matplotlib-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > -- ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Installation problem
Hi, I am sorry to bug you all with an installation problem, but I need some additional help to get this figured out. I previously had a matplotlib installed and working fine, but it was necessary for me to redo some other installations like numpy when I needed a complete lapack library. This also led to me installing another version of g77, because numpy needed a specific library that was only provide by the g77 version of fortran for some reason. Anyways, numpy works great but I went back to install matplotlib and I ran into trouble. After the installation process, if I try to import matplotlib.pylab I get the following errors: from matplotlib._path import affine_transform ImportError: /ronaldo/pkg/dfranci/gcc-g77-3.4.6/lib64/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib64/libstdc++.so.6) Is this a problem that I can fix in the matplotlib installation or do I need to go back up to the numpy installation? I should note that I do not have gcc-4.2.0 on my system. Thanks in advance, Frank - 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=100&url=/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Installation problem
On Mon, Nov 10, 2008 at 3:46 PM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > I don't know if this will help, but... > > Python packages generally don't have proper dependency management when > building. That means, if an underlying dependency changes, it often doesn't > rebuild enough to keep things in sync. You may want to try rebuilding > everything after first completely removing the "build" directory to force a > complete rebuild. Do numpy first then matplotlib. > > ...but maybe you've tried that already, in which case, I don't know off > hand... > > Mike > > Frank Lagor wrote: >> >> Hi, >> >> I am sorry to bug you all with an installation problem, but I need >> some additional help to get this figured out. >> >> I previously had a matplotlib installed and working fine, but it was >> necessary for me to redo some other installations like numpy when I >> needed a complete lapack library. This also led to me installing >> another version of g77, because numpy needed a specific library that >> was only provide by the g77 version of fortran for some reason. >> Anyways, numpy works great but I went back to install matplotlib and I >> ran into trouble. After the installation process, if I try to import >> matplotlib.pylab I get the following errors: >> >> from matplotlib._path import affine_transform >> ImportError: /ronaldo/pkg/dfranci/gcc-g77-3.4.6/lib64/libgcc_s.so.1: >> version `GCC_4.2.0' not found (required by /usr/lib64/libstdc++.so.6) >> >> Is this a problem that I can fix in the matplotlib installation or do >> I need to go back up to the numpy installation? >> >> I should note that I do not have gcc-4.2.0 on my system. >> >> Thanks in advance, >> Frank >> >> - >> 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=100&url=/ >> ___ >> Matplotlib-users mailing list >> [email protected] >> 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 > > Thanks so much for the response, Mike. Yes, I learned the hard way a long time ago about having to rm -rf build/ when rebuilding python packages. I have tried this here, but I still have an issue. I am currently trying to rebuild with a different compiler and playing with environment variables. I would love any other suggestions. Thanks, Frank - 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=100&url=/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Installation problem
On Mon, Nov 10, 2008 at 4:00 PM, Darren Dale <[EMAIL PROTECTED]> wrote: > On Monday 10 November 2008 03:37:26 pm Frank Lagor wrote: > >> Hi, > >> > >> I am sorry to bug you all with an installation problem, but I need > >> some additional help to get this figured out. > >> > >> I previously had a matplotlib installed and working fine, but it was > >> necessary for me to redo some other installations like numpy when I > >> needed a complete lapack library. This also led to me installing > >> another version of g77, because numpy needed a specific library that > >> was only provide by the g77 version of fortran for some reason. > >> Anyways, numpy works great but I went back to install matplotlib and I > >> ran into trouble. After the installation process, if I try to import > >> matplotlib.pylab I get the following errors: > >> > >> from matplotlib._path import affine_transform > >> ImportError: /ronaldo/pkg/dfranci/gcc-g77-3.4.6/lib64/libgcc_s.so.1: > >> version `GCC_4.2.0' not found (required by /usr/lib64/libstdc++.so.6) > >> > >> Is this a problem that I can fix in the matplotlib installation or do > >> I need to go back up to the numpy installation? > >> > >> I should note that I do not have gcc-4.2.0 on my system. > > Try removing the build/ directory from your mpl source directory, as well as > your site-packages/matplotlib*, and recompile. Hi Darren, Yes, unfrotunately I tried this as well to no avail. Thank you though, Frank - 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=100&url=/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Installation problem
On Wed, Nov 19, 2008 at 4:52 AM, <[EMAIL PROTECTED]> wrote: > > Frank Lagor wrote: >> >> Hi, >> >> I am sorry to bug you all with an installation problem, but I need >> some additional help to get this figured out. >> >> I previously had a matplotlib installed and working fine, but it was >> necessary for me to redo some other installations like numpy when I >> needed a complete lapack library. This also led to me installing >> another version of g77, because numpy needed a specific library that >> was only provide by the g77 version of fortran for some reason. >> Anyways, numpy works great but I went back to install matplotlib and I >> ran into trouble. After the installation process, if I try to import >> matplotlib.pylab I get the following errors: >> >> from matplotlib._path import affine_transform >> ImportError: /ronaldo/pkg/dfranci/gcc-g77-3.4.6/lib64/libgcc_s.so.1: >> version `GCC_4.2.0' not found (required by /usr/lib64/libstdc++.so.6) >> >> Is this a problem that I can fix in the matplotlib installation or do >> I need to go back up to the numpy installation? >> >> I should note that I do not have gcc-4.2.0 on my system. >> >> Thanks in advance, >> Frank >> >> - >> 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=100&url=/ >> ___ >> Matplotlib-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > Quoted from: > http://www.nabble.com/Installation-problem-tp20427671p20427671.html > > I have the same problem on my portable (windows XP) but everithing works on > my desk top!! > Do you have received any answer? > Thanks > Domenico > > > Hi Domenico, Yes, the problem was resolved and it all works great now. I can't tell you exactly what fixed it because I am no an expert on library files, compiling stuff, etc. However, here is what I thought: I thought that the libstdc++.so was not finding the correct library files for the compiler or that there was a difference between the version of gcc compiler used to make the libstdc++.so file and the gcc compiler that I used to build other python related dependencies like numpy. So here is what I did: (I'm sorry but I do not know how to do this in wondows. I only know what I did linux) 1) Installed a brand new version on the gcc suite of compilers on my computer. (I took a long time to do this, but I wanted to make sure that all the library files and the compilers that I used matched up and worked well.) I seem to recall that there was one flag which was important: I think it was --with-gnu-ld, which tells gcc to use the gnu ld program for linking library files. Please also be sure to set the LD_LIBRARY_PATH variable to find all the appropriate library files. 2) I rebuilt LAPACK and ATLAS (because I was having trouble with them too and I knew that numpy depended on the lapack routines. 3) I rebuilt numpy. 4) I installed matplotlib. I know this probably seems like overkill, but it is what I had to do to get my machine working. Sorry I can't be of more help, these issues are pretty specific to the individual computer. Best of luck, Frank - 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=100&url=/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] (no subject)
Hello all.
I have a rather long code and get always a strange error:
can't invoke "event" command: application has been destroyed
while executing
"event generate $w "
(procedure "ttk::ThemeChanged" line 6)
invoked from within
"ttk::ThemeChanged"
The code is too long but I found some other code that produces exactly
same type of error (see below).
Does anybody have an idea what can be done in this case? Thx for
some help.
Frank.
I use: Ubuntu 10.10, 64 bit, Tkinter, Python 2.6, etc ...
***
import matplotlib.pyplot as plt
fig1 = plt.figure()
plt.plot(range(10), 'ro-')
plt.title('This figure will be saved but not shown')
fig1.savefig('fig1.png')
plt.close(fig1)
fig2 = plt.figure()
plt.plot(range(10), 'bo')
plt.title('This figure will be shown')
plt.show()--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Problem in animation cookbook example
I believe I've found a problem with the following cookbook example: http://www.scipy.org/Cookbook/Matplotlib/Animations?action=show#head-3d51654b8306b1585664e7fe060a60fc76e5aa08. Specifically, the example calls canvas.copy_from_bbox() before the initial draw(). This doesn't throw an error, but will result in unexpected behavior (I spent an embarrassing amount of time debugging the resulting confusion in my own code). The solution I came up with to fix the issue is to structure the code as follows: ...set up plot... background = None def animate(*args): global background if background is None: background = canvas.copy_from_bbox(ax.bbox) canvas.restore_region(background) ...rest of animation... gobject.idle_add(animate) p.show() This works, but I dislike it for two reasons: I have to use a global variable, and there is an extra conditional test in every call to the animation function. Obviously neither flaw is terribly serious, but I was wondering if there is a better / accepted way of handling this. Or, am I just completely off-base on this whole issue -- I'm new to matplotlib, still figuring things out. Thanks, Drew Frank -- Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] "undefined symbol" error message when importing from matplotlib._path
Hi, we're running Matplotlib 1.0.0 with Python 2.6.2 on CentOS 5.6. When importing from matplotlib._path, users get an error message "undefined symbol: _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l" I'm at a loss. There were no errors during the installation Generating the error: $ python-2.6 Python 2.6.2 (r262:71600, Aug 5 2010, 14:21:11) [GCC 4.4.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from matplotlib._path import affine_transform Traceback (most recent call last): File "", line 1, in ImportError: /g/software/linux/pack/python-2.6/lib/python2.6/site-packages/matplotlib/_path.so: undefined symbol: _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l >>> exit() $ Anyone has seen this before and/or knows a fix? There are some reports about such an error on the web, but they are all quite old and I cannot relate them to the current issue. Thanks in advance frank -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Change JPG compression ratio in savefig
Hi, I am using matplotlib.savefig to save my figures as JPEG files. Now I need to reduce the JPG compression ratio. How can I do this? Any hint is appreciated. Frank -- Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] font size on DateFormatter
Hi ,
I am plotting some date based data (dates/values).
Seems to work ok. The code snippet is below.
But what I am trying to do is set the font size of the (%b)
month labels (Jan,Feb etc) as they are too big for my small graph
and they run into each other ..
ax.xaxis.set_major_formatter( DateFormatter('%Y') )
ax.xaxis.set_major_locator( YearLocator() )
ax.xaxis.set_minor_formatter( DateFormatter('%b'))
ax.xaxis.set_minor_locator( MonthLocator(interval=1) )
ax.plot_date(dates,values, label="My
Label",color='g',linestyle='-',marker='.')
Thanks / Frank
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Multiple Y axes
Is there any way to have multiple y-axes (more than two). I’m looking to plot time series data and would like to overlay say four data sets each with its own independent axis. Thank you. Frank Internet Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply email. Please advise immediately if you or your employer do not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of The Shaw Group Inc. or its subsidiaries shall be understood as neither given nor endorsed by it. __ The Shaw Group Inc. http://www.shawgrp.com - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Upgrade matplotlib [newbie]
Hi sorry for the stupid question but I have installed an RPM version of matplotlib and now I would like to upgrade it. Unfortunately I would like to install a version that doesn't have an RPM. I downloaded the source and built it, but I don't know if I can just install it over the old version or if I have to remove the old version and then install the old one ... What should I do with Scipy and Numpy? Is there some docs about this? Thanks for the help Frank - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Plotting data against date/time
Hi a newbie question. After having a look at the date examples of matplotlib, I still have some problem with this: I have data starting at a certain date/time (e.g. 30 Nov 2006 12.00 pm). I have one data for every hour starting from the 13th hour after the starting time until the 96th hour. I would like to put on the x axis the day/hour (let's say every 3 or 6 hour). Could you please help me setting me on the right way to the solution? Thanx Frank - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
