[matplotlib-devel] verticalalignment for titles
Hi, When "baseline" recently became the default for text(), it's no longer possible to have two-line titles, title("First line\nSecond Line), without adding va="bottom". It would be nice if title() somehow could have "bottom" as default. Cheers, Olle -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] SVG backend - edge alpha channel fix?
Here is an example which generates both a png and svg file. The png edge alpha levels are displayed correctly, while the svg edges have an alpha value of 1.0 I tested this with a fresh build of matplotlib-1.0.svn r8391 Thanks for your help. #!/usr/bin/python import sys import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as N import networkx as nx def main(): G = nx.Graph() G.add_nodes_from([0,1,2]) G.add_edges_from([(0,1),(0,2),(1,2)]) pos = nx.spring_layout(G) nx.draw_networkx_nodes(G, pos, node_size=1500, node_color=['c','m','y'], alpha=0.3) nx.draw_networkx_edges(G, pos, width=45, edge_color=['r','g','b'], alpha=0.3) nx.draw_networkx_labels(G, pos) plt.savefig('test.png') plt.savefig('test.svg') return 0 if __name__ == "__main__": sys.exit(main()) -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] verticalalignment for titles
I think the better fix here might be to fix "baseline" to use the baseline of the bottom line of text, rather than the top. We are making a concerted effort to use "baseline" as much as possible, because it is generally the right choice. I have committed this fix to r8393. Mike On 06/07/2010 07:27 AM, Olle Engdegård wrote: > Hi, > > When "baseline" recently became the default for text(), it's no longer > possible to have two-line titles, title("First line\nSecond Line), > without adding va="bottom". It would be nice if title() somehow could > have "bottom" as default. > > Cheers, > Olle > > -- > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > ___ > Matplotlib-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
[matplotlib-devel] Building matplotlib on OS X
I've had several problems with building on OS X in the past, and was just notified that a bug I opened about it has closed. Eric Firing suggested that I re-open the bug if it is still a problem. It is still a problem, but I can't seem to figure out how to re-open my bug report, so I'll report it again here with an update on the procedures I followed. First, I downloaded a fresh copy of matplotlib source: svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib matplotlib Then, following the instructions I found in README.osx: PREFIX=/Users/mhearne/build make -f make.osx fetch deps mpl_install I then moved my current matplotlib (one from Enthought) aside: cd /Library/Frameworks/EPD64.framework/Versions/Current/lib/python2.6/site-packages sudo mv matplotlib matplotlib.old I then used setup.py to install matplotlib: sudo /Library/Frameworks/EPD64.framework/Versions/Current/bin/python setup.py install Then I tried to import ft2font from the ipython command line: from matplotlib import ft2font and got the following error: --- ImportError Traceback (most recent call last) /Users/mhearne/build/matplotlib/ in () ImportError: dlopen(/Library/Frameworks/EPD64.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/ft2font.so, 2): Symbol not found: _FT_Attach_File Referenced from: /Library/Frameworks/EPD64.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/ft2font.so Expected in: flat namespace in /Library/Frameworks/EPD64.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/ft2font.so -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Building matplotlib on OS X
On Mon, Jun 7, 2010 at 10:26 AM, Michael Hearne wrote: > I've had several problems with building on OS X in the past, and was just > notified that a bug I opened about it has closed. Eric Firing suggested that > I re-open the bug if it is still a problem. It is still a problem, but I > can't seem to figure out how to re-open my bug report, so I'll report it > again here with an update on the procedures I followed. > > First, I downloaded a fresh copy of matplotlib source: > > svn co > https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib > matplotlib > > Then, following the instructions I found in README.osx: > PREFIX=/Users/mhearne/build make -f make.osx fetch deps mpl_install > > I then moved my current matplotlib (one from Enthought) aside: > cd > /Library/Frameworks/EPD64.framework/Versions/Current/lib/python2.6/site-packages > sudo mv matplotlib matplotlib.old > > I then used setup.py to install matplotlib: > sudo /Library/Frameworks/EPD64.framework/Versions/Current/bin/python setup.py > install You do not want to do this last step. The mpl_install in the make command will handle the install. This last step may be building against different libs, which is probably why you are seeing the ft2font import link problem. Note that the install will be put into $PREFIX/lib/python.6/site-packages so the PREFIX should be your installation target, not your build target. Ie, it looks like you are not setting the PREFIX according to the intent. I suggest something like > sudo PREFIX=/Library/Frameworks/EPD64.framework/Versions/Current/ make -f deps mpl_install for your current file hierarchy. Alternatively, you can do > PREFIX=/Users/mhearne/build make -f make binaries and then use the binary installers that are built to do the site wide install. JDH -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] SVG backend - edge alpha channel fix?
On 06/07/2010 03:04 AM, Bob wrote: > Here is an example which generates both a png and svg file. > The png edge alpha levels are displayed correctly, while the svg edges > have an alpha value of 1.0 > I tested this with a fresh build of matplotlib-1.0.svn r8391 > Thanks for your help. And thank you for the report. I have fixed this in 8394. Eric > > #!/usr/bin/python > import sys > import matplotlib > matplotlib.use('Agg') > import matplotlib.pyplot as plt > import numpy as N > import networkx as nx > > def main(): > G = nx.Graph() > G.add_nodes_from([0,1,2]) > G.add_edges_from([(0,1),(0,2),(1,2)]) > pos = nx.spring_layout(G) > nx.draw_networkx_nodes(G, pos, node_size=1500, > node_color=['c','m','y'], alpha=0.3) > nx.draw_networkx_edges(G, pos, width=45, edge_color=['r','g','b'], > alpha=0.3) > nx.draw_networkx_labels(G, pos) > plt.savefig('test.png') > plt.savefig('test.svg') > return 0 > > if __name__ == "__main__": > sys.exit(main()) > > -- > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > ___ > Matplotlib-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Building matplotlib on OS X
John - I followed your advice, and tried the build/install step again after downloading a completely fresh svn copy of the source: svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib matplotlib cd matplotlib sudo PREFIX=/Library/Frameworks/EPD64.framework/Versions/Current/ make -f make.osx fetch deps mpl_install It successfully compiled and installed matplotlib in my site-packages directory. However, I still see this in ipython: >>from matplotlib import ft2font --- ImportError Traceback (most recent call last) /Users/mhearne/ in () ImportError: dlopen(/Library/Frameworks/EPD64.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/ft2font.so, 2): Symbol not found: _FT_Attach_File Referenced from: /Library/Frameworks/EPD64.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/ft2font.so Expected in: flat namespace in /Library/Frameworks/EPD64.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/ft2font.so Am I missing some other step? Thanks, Mike On Jun 7, 2010, at 9:52 AM, John Hunter wrote: > On Mon, Jun 7, 2010 at 10:26 AM, Michael Hearne wrote: >> I've had several problems with building on OS X in the past, and was just >> notified that a bug I opened about it has closed. Eric Firing suggested >> that I re-open the bug if it is still a problem. It is still a problem, but >> I can't seem to figure out how to re-open my bug report, so I'll report it >> again here with an update on the procedures I followed. >> >> First, I downloaded a fresh copy of matplotlib source: >> >> svn co >> https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib >> matplotlib >> >> Then, following the instructions I found in README.osx: >> PREFIX=/Users/mhearne/build make -f make.osx fetch deps mpl_install >> >> I then moved my current matplotlib (one from Enthought) aside: >> cd >> /Library/Frameworks/EPD64.framework/Versions/Current/lib/python2.6/site-packages >> sudo mv matplotlib matplotlib.old >> >> I then used setup.py to install matplotlib: >> sudo /Library/Frameworks/EPD64.framework/Versions/Current/bin/python >> setup.py install > > > You do not want to do this last step. The mpl_install in the make > command will handle the install. This last step may be building > against different libs, which is probably why you are seeing the > ft2font import link problem. > > Note that the install will be put into > $PREFIX/lib/python.6/site-packages so the PREFIX should be your > installation target, not your build target. Ie, it looks like you are > not setting the PREFIX according to the intent. > > I suggest something like > >> sudo PREFIX=/Library/Frameworks/EPD64.framework/Versions/Current/ > make -f deps mpl_install > > for your current file hierarchy. Alternatively, you can do > >> PREFIX=/Users/mhearne/build make -f make binaries > > and then use the binary installers that are built to do the site wide install. > > > JDH -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Building matplotlib on OS X
On Mon, Jun 7, 2010 at 4:13 PM, Michael Hearne wrote: > John - I followed your advice, and tried the build/install step again after > downloading a completely fresh svn copy of the source: > > svn co > https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib > matplotlib > cd matplotlib > sudo PREFIX=/Library/Frameworks/EPD64.framework/Versions/Current/ make -f > make.osx fetch deps mpl_install > > It successfully compiled and installed matplotlib in my site-packages > directory. However, I still see this in ipython: > >>>from matplotlib import ft2font > --- > ImportError Traceback (most recent call last) > > /Users/mhearne/ in () > > ImportError: > dlopen(/Library/Frameworks/EPD64.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/ft2font.so, > 2): Symbol not found: _FT_Attach_File > Referenced from: > /Library/Frameworks/EPD64.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/ft2font.so > Expected in: flat namespace > in > /Library/Frameworks/EPD64.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/ft2font.so > > Am I missing some other step? One possibility is that the path from the traceback /Library/Frameworks/EPD64.framework/Versions/6.0.0/lib/python2.6/site-packages is not the same as your PREFIX "PREFIX=/Library/Frameworks/EPD64.framework/Versions/Current/" unless "Current" is a symlink to 6.0.0 which it very well may be. Can you confirm? If you are getting different versions, you'll need to set your PYTHONPATH. Alternatively, we may need to set your LD_LIBRARY_PATH or similar to find the libs we built. They should be in $PREFIX/lib. You can use otool to see what the linker is finding in your current environment > otool -L /Library/Frameworks/EPD64.framework/Versions/Current/lib/python2.6/site-packages/matplotlib/ft2font.so There may be another way -- you can set your prefix to something like PREFIX=~/tmpbuild and then build as before but do 'make binaries' rather than 'make mpl_install'. Then use the binary installer to do the system install. This may get you a build with the support libs statically linked in, though I am not sure about this. Sorry this is such a pain -- I keep trying to make a build script that works for people but it obviously isn't there yet. JDH -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel