Gappy bars when no edge specified?

Hi All,

Why does the following render small gaps horizontally between the bars?

import pylab
data = [1,2,1,2,4,2]
labels = pylab.arange(len(data1))
pylab.bar(labels,data1,width=1,linewidth=0)
pylab.show()

How do I make the small gaps go away?

cheers,

Chris

Chris Withers wrote:

Hi All,

Why does the following render small gaps horizontally between the bars?

import pylab
data = [1,2,1,2,4,2]
labels = pylab.arange(len(data1))
pylab.bar(labels,data1,width=1,linewidth=0)
pylab.show()

How do I make the small gaps go away?

With svn I don't see any gaps in the example above, either on screen or when saved to a png file.

Eric

···

cheers,

Chris

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Eric Firing wrote:

How do I make the small gaps go away?

With svn I don't see any gaps in the example above, either on screen or when saved to a png file.

That's cool'n'all, but when is svn going to make it into a Windows binary release? :wink:

cheers,

Chris - not sure how to compile MPL on Windows :frowning:

···

--
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk

Chris Withers wrote:

Eric Firing wrote:
  

How do I make the small gaps go away?
      

With svn I don't see any gaps in the example above, either on screen or when saved to a png file.
    
That's cool'n'all, but when is svn going to make it into a Windows binary release? :wink:
  

I suspect your question is somewhat rhetorical, but... it will probably be a while :wink: The SVN trunk recently went through a major refactoring and needs a lot of shaking out of bugs before the next release.

cheers,

Chris - not sure how to compile MPL on Windows :frowning:

I know a lot of people (myself included) have had success with MinGW. It's a good learning experience, and there's lots on this list willing to help. If we can get more SVN Windows users on board, more crazy Windows-only bugs will get found and squashed sooner... :wink:

Cheers,
Mike

Michael Droettboom wrote:

That's cool'n'all, but when is svn going to make it into a Windows binary release? :wink:
  

I suspect your question is somewhat rhetorical, but... it will probably be a while :wink:

Why is that? Who cranks out the binary releases on Windows and what compiler do they use?

I know a lot of people (myself included) have had success with MinGW.

What's the "official" compiler used, though?

It's a good learning experience, and there's lots on this list willing to help. If we can get more SVN Windows users on board, more crazy Windows-only bugs will get found and squashed sooner... :wink:

Well, tell me how to get the svn trunk and how to compile and I'll give it a go :slight_smile:

cheers,

Chris

···

--
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk

Chris Withers wrote:

Michael Droettboom wrote:

That's cool'n'all, but when is svn going to make it into a Windows binary release? :wink:
  

I suspect your question is somewhat rhetorical, but... it will probably be a while :wink:

Why is that? Who cranks out the binary releases on Windows and what compiler do they use?

I know a lot of people (myself included) have had success with MinGW.

What's the "official" compiler used, though?

It's a good learning experience, and there's lots on this list willing to help. If we can get more SVN Windows users on board, more crazy Windows-only bugs will get found and squashed sooner... :wink:

Well, tell me how to get the svn trunk and how to compile and I'll give it a go :slight_smile:

Assuming you have svn installed on your machine, start here:

You will probably want to modify the checkout command slightly, something like this:

svn co matplotlib download | SourceForge.net mpl_svn

(That should be all one line, but the mailer may have broken it.)

There are some Windows-related compilation hints in the INSTALL.txt file and in setupext.py. I think the basic idea is that once you have all prerequisites in place, complete with header files, then the standard "python setup.py install" will do the right thing. The hard part is probably getting all the prerequisites installed. I've never tried on Win, so I don't know.

Charlie Moad does the Windows releases. I don't know what compiler he uses.

It would be nice if some people who have successfully built on Windows could collectively assemble a step-by-step account of how to go from a bare Win box to a working mpl (preferably compiled with mingw); but maybe this would take more effort than it is worth. I am on shaky ground suggesting it, because it is not something I can help with at all, and I don't even have a clear picture of what it would require. I gather a similar account would be useful for OS X.

Eric

···

cheers,

Chris

Chris Withers wrote:

Michael Droettboom wrote:

That's cool'n'all, but when is svn going to make it into a Windows binary release? :wink:
  

I suspect your question is somewhat rhetorical, but... it will probably be a while :wink:

Why is that? Who cranks out the binary releases on Windows and what compiler do they use?

Matplotlib recently underwent a major refactoring of the code to make it easier to add new transformations and projections to the system. This code is significantly less tested than the latest release. The idea of a release is that it is reasonably well-tested and reasonably stable. Obviously, the matplotlib releases aren't perfect, but I suspect 0.91.2 is far more safe and predictable than SVN trunk is right now.

However, there is a branch, matplotlib_0_91_maint, that *theoretically* should be the latest release + any important bugfixes, but no new features. I say *theoretically* because occasionally bugfixes are made only to the trunk. If you find such a fix, let us know and hopefully someone can backport it.

Mike

···

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Chris:

I have used cygwin to compile numpy and scipy svn versions for win XP on my old athlon system. I believe the scipy site has some detailed instructions. However, I have done a lot of compiling on my linux system and so that part was easy (configure, make, make install, etc) I don't know about mpl but scipy for sure was very sensitive to the platform and the stock scipy distro blew up big time doing curve fitting optimizations. Compiling my own versions made those problems go away, thankfully. You can download cygwin and install it easily enough but then you need to pick which of the included programs to install and that is a pain unless you have disk space and can do everything.

For numpy and scipy I did the following in the cygwin prompt after cd-ing to where I keep my sources:

  "/cygdrive/c/python25/python.exe setup.py config --compiler=mingw32 build \
--compiler=mingw32 bdist_wininst " and this produced a windows .exe installer.

I tried mpl last night and it failed due to some dependencies, I think it was freetype that was missing and I couldn't satisfy the requirements but maybe someone on the list can enlighten us. With that taken care of, it should be straightforward.

Wayne

Chris Withers wrote:

···

Michael Droettboom wrote:
  

That's cool'n'all, but when is svn going to make it into a Windows binary release? :wink:
  

I suspect your question is somewhat rhetorical, but... it will probably be a while :wink:
    
Why is that? Who cranks out the binary releases on Windows and what compiler do they use?

I know a lot of people (myself included) have had success with MinGW.
    
What's the "official" compiler used, though?

It's a good learning experience, and there's lots on this list willing to help. If we can get more SVN Windows users on board, more crazy Windows-only bugs will get found and squashed sooner... :wink:
    
Well, tell me how to get the svn trunk and how to compile and I'll give it a go :slight_smile:

cheers,

Chris

Eric Firing wrote:

It would be nice if some people who have successfully built on Windows could collectively assemble a step-by-step account of how to go from a bare Win box to a working mpl (preferably compiled with mingw); but maybe this would take more effort than it is worth.

I don't think so -- that would be great!

> I gather a similar account would be useful for OS X.

It would, and it's been done at various times by various people (myself included, a good while back). I don't know if there is a recent one out there.

both of these should be in an easy-to-find place on the Wiki.

As for OS-X: OS-X is a pain in the &^%^ because Apple doesn't include all the libs MPL needs (I'm not up to date on this, but I think libpng, libjpeg and libfreetype). On Windows, this is also the case, but I understand that the MPL distro includes them. On OS-X, it is just easy enough to get them elsewhere that there isn't the motivation to get them included in MPL. However, the problem comes in that there are way too many ways to get these libs on OS-X:
  - compile from a tarball
  - fink
  - macports
  - various binary installers.

Also, even with these methods, there are issues of how they compiled: Intel, PPC, or Universal.

Ideally, we'd all use the same Universal libs, but the fact is that it it easier to get it running on your own machine by using fink or macport or the tarball, and building just for your system, but then you dont' get something fully redistributable.

Further complicating all this is that there are way too many versions of Python for OS-X: Framework, fink, macports, activestate, Apple's, "MacPython", etc.

Personally, I'd really like there to be a decision about what is supported by MPL, and I think that should be:

MacPython2.5 (for OS-X 10.3.9 to 10.5)
Universal Builds
Extra libs statically linked in.
Most recent numpy release.
Tk and wx back-ends
Cocoa? (is that functional?)

It's a bit of pain to get set up to build this, but once you're set up, it's easy to do and distribute it an everyone can use it.

Also, I THINK it's possible to build a binary distro (egg?) that will work with both MacPython2.5 and Apple's 25 (which comes with OS-X 10.5). Can anyone confirm this?

Either easy_install or *.dmgs (build with bdist_mpkg) that can be downloaded and clicked on would be fine.

The wxPython project supports OS-X builds like this, and it works great.

fink and macports can do their own thing.

Is there currently an appropriate place in the Wiki for "How to install on OS-X" ?

After all that writting, I see:

    matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg

on the sourceforge download site -- this looks like it's just what I'm suggesting. If that didn't work for the OP, we should figure out why not.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

I made fairly detailed notes when I build numpy, scipy and mpl on a
pristine powerbook:
http://ipython.scipy.org/moin/Py4Science/InstallationOSX

Unfortunately, I am having the same compiler error that Zachary and
others are discussing in another thread (on the trunk but not the
branch)

JDH

···

On Fri, Mar 21, 2008 at 2:00 AM, Eric Firing <efiring@...202...> wrote:

Charlie Moad does the Windows releases. I don't know what compiler he uses.

It would be nice if some people who have successfully built on Windows
could collectively assemble a step-by-step account of how to go from a
bare Win box to a working mpl (preferably compiled with mingw); but
maybe this would take more effort than it is worth. I am on shaky
ground suggesting it, because it is not something I can help with at
all, and I don't even have a clear picture of what it would require. I
gather a similar account would be useful for OS X.