[Matplotlib-users] Bar graphs showing up incorrectly until they are resized:

2012-02-23 Thread federico vaggi
Hi,

I am using matplotlib to draw a few bar plots.  The library works
wonderfully, but the figures are drawn incorrectly until they are resized

Here is the figure before resizing:

http://imgur.com/MKATg

here is after resizing:

http://imgur.com/bSiOT

It seems that the rectangles of the bar somehow are not drawn properly.

Any suggestions on how to fix it automatically?

Federico
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Number of decimal places

2012-02-23 Thread Nils Wagner

Hi all,

How can I increase the number of decimal places in yticks 
?


 Nils

from matplotlib.ticker import ScalarFormatter
formatter = 
ScalarFormatter(useMathText=True,useOffset=False)

formatter.set_scientific(True)
formatter.set_powerlimits((-12,12))
print dir (formatter)
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
ax.yaxis.set_major_formatter(formatter)

import numpy as np

A=np.array([[ 1 , 0.00E+00 , 5.234141E-06],
[ 2 , 1.00E+00 , 5.233310E-06],
[ 3 , 2.00E+00 , 5.232660E-06],
[ 4 , 3.00E+00 , 5.231808E-06],
[ 5 , 4.00E+00 , 5.231277E-06],
[ 6 , 5.00E+00 , 5.230664E-06],
[ 7 , 6.00E+00 , 5.230423E-06],
[ 8 , 7.00E+00 , 5.230136E-06]])

ax.plot(A[:,1],A[:,2])
plt.show()
attachment: image.png--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problems installaling matplotlib on ubuntu 11.10

2012-02-23 Thread avalle
Thank you all for your help
Using sudo generates an error, without it everything run ok.

:~$ sudo python -c import numpy; print numpy.__version__
Traceback (most recent call last):
  File string, line 1, in module
  File /usr/local/lib/python2.7/dist-packages/numpy/__init__.py, line
137, in module
import add_newdocs
  File /usr/local/lib/python2.7/dist-packages/numpy/add_newdocs.py, line
9, in module
from numpy.lib import add_newdoc
  File /usr/local/lib/python2.7/dist-packages/numpy/lib/__init__.py,
line 13, in module
from polynomial import *
  File /usr/local/lib/python2.7/dist-packages/numpy/lib/polynomial.py,
line 17, in module
from numpy.linalg import eigvals, lstsq
  File /usr/local/lib/python2.7/dist-packages/numpy/linalg/__init__.py,
line 48, in module
from linalg import *
  File /usr/local/lib/python2.7/dist-packages/numpy/linalg/linalg.py,
line 23, in module
from numpy.linalg import lapack_lite
ImportError: libifport.so.5: cannot open shared object file: No such file
or directory

And the other command suggested by Eric, I think matplotlib is not
displayed due to it is not intalled yet, isn't it?

~$ sudo python -c import sys; print '\n'.join(sys.path)
/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg
/usr/local/lib/python2.7/dist-packages/nose-0.11.0.dev_r636-py2.7.egg
/usr/local/lib/python2.7/dist-packages/FiPy-2.1.2-py2.7.egg
/usr/local/lib/python2.7/dist-packages/pysparse-1.2_dev224-py2.7-linux-x86_64.egg
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7
/usr/lib/python2.7/plat-linux2
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PIL
/usr/lib/python2.7/dist-packages/gst-0.10
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/pymodules/python2.7
/usr/lib/pymodules/python2.7/libubuntuone
/usr/lib/python2.7/dist-packages/ubuntu-sso-client
/usr/lib/python2.7/dist-packages/ubuntuone-client
/usr/lib/python2.7/dist-packages/ubuntuone-control-panel
/usr/lib/python2.7/dist-packages/ubuntuone-installer
/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol
/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode

should I reinstall numpy?
Thanks,
Lucia

 On 02/22/2012 04:06 PM, ava...@famaf.unc.edu.ar wrote:
 Dear users,
 I am trying to install matplotlib from source. When I run:
   sudo python setup.py install  build.out
 I got the following:
 basedirlist is: ['/usr/local', '/usr']
 
 BUILDING MATPLOTLIB
  matplotlib: 1.2.x
  python: 2.7.2+ (default, Oct  4 2011, 20:06:09)  [GCC
 4.6.1]
platform: linux2

 REQUIRED DEPENDENCIES
   numpy: no
  * You must install numpy 1.4 or later to build
  * matplotlib.

 But numpy is installed(/usr/local/lib/python2.7/dist-packages/numpy)
 python -c import numpy; print numpy.__version__
 1.6.1
 How matplotlib could locate numpy path?

 mpl is trying to use exactly this method: import numpy.  See the
 check_for_numpy function() in setupext.py.

 All I can imagine is that either because of sudo, or because of the
 terminal you were in when you tried to build, your sys.path was not
 including the /usr/local path.

 Try:
 sudo python -c import numpy; print numpy.__version__

 sudo python -c import sys; print '\n'.join(sys.path)

 The latter must include /usr/local/lib/python2.7/dist-packages.

 Eric


 How this problem could be solved?
 Thanks a lot in advance.
 Lucia




 --
 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
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 --
 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
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users




--
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/

Re: [Matplotlib-users] problems installaling matplotlib on ubuntu 11.10

2012-02-23 Thread Scott Sinclair
On Feb 23, 2012 1:39 PM, ava...@famaf.unc.edu.ar wrote:

 should I reinstall numpy?

No need. You should be able to build matplotlib without sudo and then
install with sudo

python setup.py build
sudo python setup.py install

Cheers,
Scott
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Issues with clang when building on MacOS 10.7

2012-02-23 Thread Thomas Robitaille
Hello,

I am trying to build the latest version of matplotlib from the git repository 
(1cd07a6c) on MacOS 10.7, and regardless of whether I build using the make.osx 
file or just 'python setup.py build', the C files get compiled with clang, and 
clang raises an error on one of the files:

/Developer/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -O2 
-fwrapv -DNDEBUG -g -O3 -Wall -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API 
-DPYCXX_ISO_CPP_LIB=1 
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
 -I. 
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
 -Isrc -Iagg24/include -I. 
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
 -I/opt/local/include/freetype2 -I/opt/local/include -I. 
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 
-c src/backend_agg.cpp -o build/temp.macosx-10.7-x86_64-2.7/src/backend_agg.o
In file included from src/backend_agg.cpp:11:
In file included from src/_backend_agg.h:34:
agg24/include/agg_renderer_outline_aa.h:1368:45: error: binding of reference to 
type 'agg::line_profile_aa' to a value of type 'const agg::line_profile_aa' 
drops qualifiers
line_profile_aa profile() { return *m_profile; }
^~
1 error generated.

error: command '/Developer/usr/bin/clang' failed with exit status 1

If I do:

CC=gcc python setup.py build

then things work fine, but I just wanted to raise the point that the C files do 
not compile successfully with clang at this time (but this seems to be the 
default compiler on 10.7).

Cheers,
Tom



--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Matplotlib gallery

2012-02-23 Thread Nicolas Rougier


I've seen the discussion around the re-organization of the matplotlib gallery.
If that might help, here is a link to a small gallery I made.

The overall organization is simply based on subdirectories so maybe it could be 
a (temporary) solution for the matplotlib gallery (just matter of moving 
examples in the right subdirectory).


http://www.loria.fr/~rougier/coding/gallery/
https://github.com/rougier/gallery



Nicolas
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Issues with clang when building on MacOS 10.7

2012-02-23 Thread Michael Droettboom
It looks like a bug in agg that the stricter clang is picking up.  If 
you change agg24/include/agg_renderer_outline_aa.h:1368 to read:

const line_profile_aa profile() { return *m_profile; }

does that help?  (There's probably other cases like this behind it).

I don't have a complete OS-X environment right now to test with, or I'd 
see what the other issues were myself.

Mike

On 02/23/2012 07:47 AM, Thomas Robitaille wrote:
 Hello,

 I am trying to build the latest version of matplotlib from the git repository 
 (1cd07a6c) on MacOS 10.7, and regardless of whether I build using the 
 make.osx file or just 'python setup.py build', the C files get compiled with 
 clang, and clang raises an error on one of the files:

 /Developer/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -O2 
 -fwrapv -DNDEBUG -g -O3 -Wall -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API 
 -DPYCXX_ISO_CPP_LIB=1 
 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
  -I. 
 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
  -Isrc -Iagg24/include -I. 
 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
  -I/opt/local/include/freetype2 -I/opt/local/include -I. 
 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
  -c src/backend_agg.cpp -o build/temp.macosx-10.7-x86_64-2.7/src/backend_agg.o
 In file included from src/backend_agg.cpp:11:
 In file included from src/_backend_agg.h:34:
 agg24/include/agg_renderer_outline_aa.h:1368:45: error: binding of reference 
 to type 'agg::line_profile_aa' to a value of type 'const 
 agg::line_profile_aa' drops qualifiers
 line_profile_aa  profile() { return *m_profile; }
 ^~
 1 error generated.

 error: command '/Developer/usr/bin/clang' failed with exit status 1

 If I do:

 CC=gcc python setup.py build

 then things work fine, but I just wanted to raise the point that the C files 
 do not compile successfully with clang at this time (but this seems to be the 
 default compiler on 10.7).

 Cheers,
 Tom



 --
 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
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Issues with clang when building on MacOS 10.7

2012-02-23 Thread Michael Droettboom
I got my OS-X machine going again -- I'm looking into this further now.

Mike

On 02/23/2012 10:19 AM, Michael Droettboom wrote:
 It looks like a bug in agg that the stricter clang is picking up.  If
 you change agg24/include/agg_renderer_outline_aa.h:1368 to read:

  const line_profile_aa  profile() { return *m_profile; }

 does that help?  (There's probably other cases like this behind it).

 I don't have a complete OS-X environment right now to test with, or I'd
 see what the other issues were myself.

 Mike

 On 02/23/2012 07:47 AM, Thomas Robitaille wrote:
 Hello,

 I am trying to build the latest version of matplotlib from the git 
 repository (1cd07a6c) on MacOS 10.7, and regardless of whether I build using 
 the make.osx file or just 'python setup.py build', the C files get compiled 
 with clang, and clang raises an error on one of the files:

 /Developer/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -O2 
 -fwrapv -DNDEBUG -g -O3 -Wall -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API 
 -DPYCXX_ISO_CPP_LIB=1 
 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
  -I. 
 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
  -Isrc -Iagg24/include -I. 
 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
  -I/opt/local/include/freetype2 -I/opt/local/include -I. 
 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
  -c src/backend_agg.cpp -o 
 build/temp.macosx-10.7-x86_64-2.7/src/backend_agg.o
 In file included from src/backend_agg.cpp:11:
 In file included from src/_backend_agg.h:34:
 agg24/include/agg_renderer_outline_aa.h:1368:45: error: binding of reference 
 to type 'agg::line_profile_aa' to a value of type 'const 
 agg::line_profile_aa' drops qualifiers
 line_profile_aa   profile() { return *m_profile; }
 ^~
 1 error generated.

 error: command '/Developer/usr/bin/clang' failed with exit status 1

 If I do:

 CC=gcc python setup.py build

 then things work fine, but I just wanted to raise the point that the C files 
 do not compile successfully with clang at this time (but this seems to be 
 the default compiler on 10.7).

 Cheers,
 Tom



 --
 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
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

 --
 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
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bar graphs showing up incorrectly until they are resized:

2012-02-23 Thread Benjamin Root
On Thu, Feb 23, 2012 at 5:02 AM, federico vaggi vaggi.feder...@gmail.comwrote:

 Hi,

 I am using matplotlib to draw a few bar plots.  The library works
 wonderfully, but the figures are drawn incorrectly until they are resized

 Here is the figure before resizing:

 http://imgur.com/MKATg

 here is after resizing:

 http://imgur.com/bSiOT

 It seems that the rectangles of the bar somehow are not drawn properly.

 Any suggestions on how to fix it automatically?

 Federico


Federico,

Could you please be a bit more specific about what you think is wrong.  I
see a number of possibilities, but I can't be sure what you are referring
to.

Ben Root
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib gallery

2012-02-23 Thread Benjamin Root
On Thu, Feb 23, 2012 at 8:14 AM, Nicolas Rougier
nicolas.roug...@inria.frwrote:



 I've seen the discussion around the re-organization of the matplotlib
 gallery.
 If that might help, here is a link to a small gallery I made.

 The overall organization is simply based on subdirectories so maybe it
 could be a (temporary) solution for the matplotlib gallery (just matter of
 moving examples in the right subdirectory).


 http://www.loria.fr/~rougier/coding/gallery/
 https://github.com/rougier/gallery



 Nicolas



Nicolas,

Thank you for sharing.  Currently, our examples are organized by
subdirectories.  In fact, the Gallary has the exact same examples as the
Examples page (except for animations).  Perhaps the most simple solution
for the gallary page is to just break it up into the subsections by
directory?

Cheers!
Ben Root
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib gallery

2012-02-23 Thread Jerzy Karczmarczuk
  Nicolas Rougier :
 I've seen the discussion around the re-organization of the matplotlib gallery.
 If that might help, here is a link to a small gallery I made.

 The overall organization is simply based on subdirectories so maybe it could 
 be a (temporary) solution for the matplotlib gallery (just matter of moving 
 examples in the right subdirectory).
THANKS, Nicolas.

This is a nice initiative, but I believe that in the context of a 
presentation of some software, this is not the way I would have chosen. 
Why people look-up /such/ galleries? Why I do it myself? What are the 
needs of my students (about 20 - 30 guys who work with matplotlib week 
after wek)?

Often because I want to find a concrete program, which answers a 
concrete question : how to implement timed animations. How to make 
multiple plots. How to insert a figure in a GUI with widgets, how to 
distort an image matrix, etc. etc. So a gallery should contains infos 
about what the hell the example XYZ is about, what does it show, where 
is the *concrete* documentation page with the description of the tools 
used, etc.

The order of examples should be rational, and as ALWAYS some cross-links 
would be useful.
Program-sources without comments are not so useful...

==

But I believe that this is just a start, and I am aware that to 
criticize is easier than to do something. (Je suis un grognon né, 
Nicolas, désolé...). So please, continue, my heart is with you!


Jerzy Karczmarczuk
Caen, France.


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bar graphs showing up incorrectly until they are resized:

2012-02-23 Thread federico vaggi
Hi Ben,

In the pre-resizing pictures, each bar is drawn as two rectangles, the
first until the lower margin of the standard deviation, the second until
the mean.

It looks like it draws one rectangle from:

0:(MEAN-STD)

and another from:

MEAN-STD to MEAN+STD

After resizing, it is just a single rectangle with the standard deviation
drawn as normal.

I presume the 2nd version is meant to be correct, but absolutely no
graphics properties are altered (besides manually re-sizing the window).

Federico

On Thu, Feb 23, 2012 at 4:54 PM, Benjamin Root ben.r...@ou.edu wrote:



 On Thu, Feb 23, 2012 at 5:02 AM, federico vaggi 
 vaggi.feder...@gmail.comwrote:

 Hi,

 I am using matplotlib to draw a few bar plots.  The library works
 wonderfully, but the figures are drawn incorrectly until they are resized

 Here is the figure before resizing:

 http://imgur.com/MKATg

 here is after resizing:

 http://imgur.com/bSiOT

 It seems that the rectangles of the bar somehow are not drawn properly.

 Any suggestions on how to fix it automatically?

 Federico


 Federico,

 Could you please be a bit more specific about what you think is wrong.  I
 see a number of possibilities, but I can't be sure what you are referring
 to.

 Ben Root


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] surface plot

2012-02-23 Thread David Craig
Hi,
I have an array defined by 3 variables p(x,z,t). I would like to produce 
a surface plot with colors defined by p and animate it. That is plot the 
value of p at all x and z, over time (t).  My code to get p is below but 
I really have no idea how to plot this. Anyone know the best way to go 
about this?
thanks,
D


# 2D Finite Distance Wave Equation.
from pylab import *
from numpy import math

ion()

# Set up variables.
nx = 100
nz = 100
nsteps = 300
c = 3500
dt = 10**-4
h = 1
t = arange(0,nsteps,dt)

# Define source as a spike.
s = zeros(nsteps)
s[1] = 1
s[2] = 2
s[3] = 1

# Position source.
xs = 50
zs = 50
##plot(t,s)
##show()


# Set up pressure field.
p=empty([nx,nz,nsteps])

for t in range(0,nsteps-1):

 for z in range(0,nz-1):

 for x in range(0,nx-1):

 p[x,z,t] = 0



# Solve wave equation.
for t in range(2,nsteps-1):


 for z in range(1,nz-1):

 for x in range(2,nx-1):

 p[xs,zs,t] = s[t]

 k = (c*dt/h)**2

 p[x,z,t] = 2*p[x,z,t-1] - p[x,z,t-2] + 
k*(p[x+1,z,t-1]-4*p[x,z,t-1]+p[x-1,z,t-1]+p[x,z+1,t-1]+p[x,z-1,t-1])


 #Plot somehow
 draw()
#close()



--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] surface plot

2012-02-23 Thread Benjamin Root
On Thu, Feb 23, 2012 at 10:14 AM, David Craig dcdavem...@gmail.com wrote:

 Hi,
 I have an array defined by 3 variables p(x,z,t). I would like to produce
 a surface plot with colors defined by p and animate it. That is plot the
 value of p at all x and z, over time (t).  My code to get p is below but
 I really have no idea how to plot this. Anyone know the best way to go
 about this?
 thanks,
 D


 # 2D Finite Distance Wave Equation.
 from pylab import *
 from numpy import math

 ion()

 # Set up variables.
 nx = 100
 nz = 100
 nsteps = 300
 c = 3500
 dt = 10**-4
 h = 1
 t = arange(0,nsteps,dt)

 # Define source as a spike.
 s = zeros(nsteps)
 s[1] = 1
 s[2] = 2
 s[3] = 1

 # Position source.
 xs = 50
 zs = 50
 ##plot(t,s)
 ##show()


 # Set up pressure field.
 p=empty([nx,nz,nsteps])

 for t in range(0,nsteps-1):

 for z in range(0,nz-1):

 for x in range(0,nx-1):

 p[x,z,t] = 0



 # Solve wave equation.
 for t in range(2,nsteps-1):


 for z in range(1,nz-1):

 for x in range(2,nx-1):

 p[xs,zs,t] = s[t]

 k = (c*dt/h)**2

 p[x,z,t] = 2*p[x,z,t-1] - p[x,z,t-2] +
 k*(p[x+1,z,t-1]-4*p[x,z,t-1]+p[x-1,z,t-1]+p[x,z+1,t-1]+p[x,z-1,t-1])


 #Plot somehow
 draw()
 #close()



Here is an example using wireframe().  This method of animation is not
recommended anymore, but it does still work.  Once you get your
plot_surface version working, there are some various tricks to speed it up
and make it more efficient.  Probably the most important thing to remember
is that your norm object will need to be set before starting so that the
colors are consistent throughout the animation.

http://matplotlib.sourceforge.net/examples/mplot3d/wire3d_animation_demo.html

Cheers!
Ben Root
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib gallery

2012-02-23 Thread Nicolas Rougier


I agree, but the current matplotlib gallery is rather clueless about what the 
examples are related to until you click an image. I'm personally using the 
gallery by looking at an example that match what I've in mind most closely and 
then look at the code. But you're right, some structure(s) would definitely 
help.

Here is an example of a well structured gallery: 
http://www.gigawiz.com/aagraphs.html.

The first-level structure is organized at:

Specialized Scientific Graphing
Scatter Graphs
Contour Charts (2-D, 3-D, and Ternary)
Heatmaps
Voronoi Diagram
Waterfall Charts
Bubble Charts
Spider Charts
Polar Charts
Column and Bar Charts
Area Charts
Line Charts
Combination Charts (Column-Line, Bar-Line, Area-Line)
Diagrams of Multiple, Independent Value-Axes Column, Bar or Area Graphs
High-Low, (Open)-High-Low-Close, and Range Charts
Pie Charts and X-Y Scatter Pie
Vector Charts
Statistical Charts


Maybe we can find/agree on similar structure(s)/sub-structure(s) and adapt it 
to the current gallery ?



Nicolas



On Feb 23, 2012, at 16:59 , Jerzy Karczmarczuk wrote:

  Nicolas Rougier :
 I've seen the discussion around the re-organization of the matplotlib 
 gallery.
 If that might help, here is a link to a small gallery I made.
 
 The overall organization is simply based on subdirectories so maybe it could 
 be a (temporary) solution for the matplotlib gallery (just matter of moving 
 examples in the right subdirectory).
 THANKS, Nicolas.
 
 This is a nice initiative, but I believe that in the context of a 
 presentation of some software, this is not the way I would have chosen. 
 Why people look-up /such/ galleries? Why I do it myself? What are the 
 needs of my students (about 20 - 30 guys who work with matplotlib week 
 after wek)?
 
 Often because I want to find a concrete program, which answers a 
 concrete question : how to implement timed animations. How to make 
 multiple plots. How to insert a figure in a GUI with widgets, how to 
 distort an image matrix, etc. etc. So a gallery should contains infos 
 about what the hell the example XYZ is about, what does it show, where 
 is the *concrete* documentation page with the description of the tools 
 used, etc.
 
 The order of examples should be rational, and as ALWAYS some cross-links 
 would be useful.
 Program-sources without comments are not so useful...
 
 ==
 
 But I believe that this is just a start, and I am aware that to 
 criticize is easier than to do something. (Je suis un grognon né, 
 Nicolas, désolé...). So please, continue, my heart is with you!
 
 
 Jerzy Karczmarczuk
 Caen, France.
 
 
 --
 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
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bar graphs showing up incorrectly until they are resized:

2012-02-23 Thread federico vaggi
I think you are correct - and I think the fact that the line width of the
error bar is larger (compared to the size of the rectangle) gives the
impression the top rectangle is actually darker.

I see - it's just a matter of playing around with the error bar properties
to make it look pretty.

Thanks,

Federico

On Thu, Feb 23, 2012 at 5:13 PM, Benjamin Root ben.r...@ou.edu wrote:



 On Thu, Feb 23, 2012 at 10:03 AM, federico vaggi vaggi.feder...@gmail.com
  wrote:

 Hi Ben,

 In the pre-resizing pictures, each bar is drawn as two rectangles, the
 first until the lower margin of the standard deviation, the second until
 the mean.

 It looks like it draws one rectangle from:

 0:(MEAN-STD)

 and another from:

 MEAN-STD to MEAN+STD

 After resizing, it is just a single rectangle with the standard deviation
 drawn as normal.

 I presume the 2nd version is meant to be correct, but absolutely no
 graphics properties are altered (besides manually re-sizing the window).

 Federico


 Sorry, I am not seeing what you are saying.  Just to be clear, when you
 say bar, are you referring to the gray rectangles that denote the mean or
 the errorbars that denote the standard deviations?

 What might be confusing is that in the first graph, the cap of the
 errorbars (the horizontal line on the ends of each errorbar) is almost the
 same width as the gray bars themselves.  This sort of makes it look like
 there are two gray bars stacked on top of each other.  Is this what you are
 referring to?

 Ben Root


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Fwd: Matplotlib gallery

2012-02-23 Thread josef . pktd
I will never get use to reply-all

-- Forwarded message --
From:  josef.p...@gmail.com
Date: Thu, Feb 23, 2012 at 11:31 AM
Subject: Re: [Matplotlib-users] Matplotlib gallery
To: Nicolas Rougier nicolas.roug...@inria.fr


On Thu, Feb 23, 2012 at 11:24 AM, Nicolas Rougier
nicolas.roug...@inria.fr wrote:


 I agree, but the current matplotlib gallery is rather clueless about what the 
 examples are related to until you click an image. I'm personally using the 
 gallery by looking at an example that match what I've in mind most closely 
 and then look at the code. But you're right, some structure(s) would 
 definitely help.

 Here is an example of a well structured gallery: 
 http://www.gigawiz.com/aagraphs.html.

 The first-level structure is organized at:

 Specialized Scientific Graphing
 Scatter Graphs
 Contour Charts (2-D, 3-D, and Ternary)
 Heatmaps
 Voronoi Diagram
 Waterfall Charts
 Bubble Charts
 Spider Charts
 Polar Charts
 Column and Bar Charts
 Area Charts
 Line Charts
 Combination Charts (Column-Line, Bar-Line, Area-Line)
 Diagrams of Multiple, Independent Value-Axes Column, Bar or Area Graphs
 High-Low, (Open)-High-Low-Close, and Range Charts
 Pie Charts and X-Y Scatter Pie
 Vector Charts
 Statistical Charts


 Maybe we can find/agree on similar structure(s)/sub-structure(s) and adapt it 
 to the current gallery ?

An advantage of the current all in one page gallery is that it is
easier to find a recipe when I just look for individual plot elements,
when I have not much idea what it might be called and just some idea
what it should look like.

That's different from looking for plots with a specific usage or content.

Josef




 Nicolas



 On Feb 23, 2012, at 16:59 , Jerzy Karczmarczuk wrote:

  Nicolas Rougier :
 I've seen the discussion around the re-organization of the matplotlib 
 gallery.
 If that might help, here is a link to a small gallery I made.

 The overall organization is simply based on subdirectories so maybe it 
 could be a (temporary) solution for the matplotlib gallery (just matter of 
 moving examples in the right subdirectory).
 THANKS, Nicolas.

 This is a nice initiative, but I believe that in the context of a
 presentation of some software, this is not the way I would have chosen.
 Why people look-up /such/ galleries? Why I do it myself? What are the
 needs of my students (about 20 - 30 guys who work with matplotlib week
 after wek)?

 Often because I want to find a concrete program, which answers a
 concrete question : how to implement timed animations. How to make
 multiple plots. How to insert a figure in a GUI with widgets, how to
 distort an image matrix, etc. etc. So a gallery should contains infos
 about what the hell the example XYZ is about, what does it show, where
 is the *concrete* documentation page with the description of the tools
 used, etc.

 The order of examples should be rational, and as ALWAYS some cross-links
 would be useful.
 Program-sources without comments are not so useful...

 ==

 But I believe that this is just a start, and I am aware that to
 criticize is easier than to do something. (Je suis un grognon né,
 Nicolas, désolé...). So please, continue, my heart is with you!


 Jerzy Karczmarczuk
 Caen, France.


 --
 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
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 --
 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
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Fwd: Matplotlib gallery

2012-02-23 Thread Tony Yu
On Thu, Feb 23, 2012 at 11:32 AM, josef.p...@gmail.com wrote:

 I will never get use to reply-all

 -- Forwarded message --
 From:  josef.p...@gmail.com
 Date: Thu, Feb 23, 2012 at 11:31 AM
 Subject: Re: [Matplotlib-users] Matplotlib gallery
 To: Nicolas Rougier nicolas.roug...@inria.fr


 On Thu, Feb 23, 2012 at 11:24 AM, Nicolas Rougier
 nicolas.roug...@inria.fr wrote:
 
 
  I agree, but the current matplotlib gallery is rather clueless about
 what the examples are related to until you click an image. I'm personally
 using the gallery by looking at an example that match what I've in mind
 most closely and then look at the code. But you're right, some structure(s)
 would definitely help.
 
  Here is an example of a well structured gallery:
 http://www.gigawiz.com/aagraphs.html.
 
  The first-level structure is organized at:
 
  Specialized Scientific Graphing
  Scatter Graphs
  Contour Charts (2-D, 3-D, and Ternary)
  Heatmaps
  Voronoi Diagram
  Waterfall Charts
  Bubble Charts
  Spider Charts
  Polar Charts
  Column and Bar Charts
  Area Charts
  Line Charts
  Combination Charts (Column-Line, Bar-Line, Area-Line)
  Diagrams of Multiple, Independent Value-Axes Column, Bar or Area Graphs
  High-Low, (Open)-High-Low-Close, and Range Charts
  Pie Charts and X-Y Scatter Pie
  Vector Charts
  Statistical Charts
 
 
  Maybe we can find/agree on similar structure(s)/sub-structure(s) and
 adapt it to the current gallery ?

 An advantage of the current all in one page gallery is that it is
 easier to find a recipe when I just look for individual plot elements,
 when I have not much idea what it might be called and just some idea
 what it should look like.

 That's different from looking for plots with a specific usage or content.

 Josef


You could still have a one-page gallery with plots separated into
subheadings (and a table of contents at the top which allows you to jump to
subheadings). This alone would greatly improve navigation in the gallery.
The list of headings is great, by the way.

-Tony



 
 
  Nicolas
 
 
 
  On Feb 23, 2012, at 16:59 , Jerzy Karczmarczuk wrote:
 
   Nicolas Rougier :
  I've seen the discussion around the re-organization of the matplotlib
 gallery.
  If that might help, here is a link to a small gallery I made.
 
  The overall organization is simply based on subdirectories so maybe it
 could be a (temporary) solution for the matplotlib gallery (just matter of
 moving examples in the right subdirectory).
  THANKS, Nicolas.
 
  This is a nice initiative, but I believe that in the context of a
  presentation of some software, this is not the way I would have chosen.
  Why people look-up /such/ galleries? Why I do it myself? What are the
  needs of my students (about 20 - 30 guys who work with matplotlib week
  after wek)?
 
  Often because I want to find a concrete program, which answers a
  concrete question : how to implement timed animations. How to make
  multiple plots. How to insert a figure in a GUI with widgets, how to
  distort an image matrix, etc. etc. So a gallery should contains infos
  about what the hell the example XYZ is about, what does it show, where
  is the *concrete* documentation page with the description of the tools
  used, etc.
 
  The order of examples should be rational, and as ALWAYS some cross-links
  would be useful.
  Program-sources without comments are not so useful...
 
  ==
 
  But I believe that this is just a start, and I am aware that to
  criticize is easier than to do something. (Je suis un grognon né,
  Nicolas, désolé...). So please, continue, my heart is with you!
 
 
  Jerzy Karczmarczuk
  Caen, France.
 
 
 
 --
  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
  Matplotlib-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 
 
 
 --
  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
  Matplotlib-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 --
 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.
 

Re: [Matplotlib-users] Fwd: Matplotlib gallery

2012-02-23 Thread Benjamin Root
On Thu, Feb 23, 2012 at 10:41 AM, Tony Yu tsy...@gmail.com wrote:



 On Thu, Feb 23, 2012 at 11:32 AM, josef.p...@gmail.com wrote:

 I will never get use to reply-all

 -- Forwarded message --
 From:  josef.p...@gmail.com
 Date: Thu, Feb 23, 2012 at 11:31 AM
 Subject: Re: [Matplotlib-users] Matplotlib gallery
 To: Nicolas Rougier nicolas.roug...@inria.fr


 On Thu, Feb 23, 2012 at 11:24 AM, Nicolas Rougier
 nicolas.roug...@inria.fr wrote:
 
 
  I agree, but the current matplotlib gallery is rather clueless about
 what the examples are related to until you click an image. I'm personally
 using the gallery by looking at an example that match what I've in mind
 most closely and then look at the code. But you're right, some structure(s)
 would definitely help.
 
  Here is an example of a well structured gallery:
 http://www.gigawiz.com/aagraphs.html.
 
  The first-level structure is organized at:
 
  Specialized Scientific Graphing
  Scatter Graphs
  Contour Charts (2-D, 3-D, and Ternary)
  Heatmaps
  Voronoi Diagram
  Waterfall Charts
  Bubble Charts
  Spider Charts
  Polar Charts
  Column and Bar Charts
  Area Charts
  Line Charts
  Combination Charts (Column-Line, Bar-Line, Area-Line)
  Diagrams of Multiple, Independent Value-Axes Column, Bar or Area Graphs
  High-Low, (Open)-High-Low-Close, and Range Charts
  Pie Charts and X-Y Scatter Pie
  Vector Charts
  Statistical Charts
 
 
  Maybe we can find/agree on similar structure(s)/sub-structure(s) and
 adapt it to the current gallery ?

 An advantage of the current all in one page gallery is that it is
 easier to find a recipe when I just look for individual plot elements,
 when I have not much idea what it might be called and just some idea
 what it should look like.

 That's different from looking for plots with a specific usage or content.

 Josef


 You could still have a one-page gallery with plots separated into
 subheadings (and a table of contents at the top which allows you to jump to
 subheadings). This alone would greatly improve navigation in the gallery.
 The list of headings is great, by the way.

 -Tony



I am banging out a pull request to do just that.

Ben Root
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Issues with clang when building on MacOS 10.7

2012-02-23 Thread Michael Droettboom

It seems this was the only source of errors.  There is a pull request here:

https://github.com/matplotlib/matplotlib/pull/713

There are plenty of warnings that should probably also be dealt with, 
but this at least allows compilation to complete for now.


Mike

On 02/23/2012 10:27 AM, Michael Droettboom wrote:

I got my OS-X machine going again -- I'm looking into this further now.

Mike

On 02/23/2012 10:19 AM, Michael Droettboom wrote:

It looks like a bug in agg that the stricter clang is picking up.  If
you change agg24/include/agg_renderer_outline_aa.h:1368 to read:

  const line_profile_aa   profile() { return *m_profile; }

does that help?  (There's probably other cases like this behind it).

I don't have a complete OS-X environment right now to test with, or I'd
see what the other issues were myself.

Mike

On 02/23/2012 07:47 AM, Thomas Robitaille wrote:

Hello,

I am trying to build the latest version of matplotlib from the git repository 
(1cd07a6c) on MacOS 10.7, and regardless of whether I build using the make.osx 
file or just 'python setup.py build', the C files get compiled with clang, and 
clang raises an error on one of the files:

/Developer/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -O2 
-fwrapv -DNDEBUG -g -O3 -Wall -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API 
-DPYCXX_ISO_CPP_LIB=1 
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
 -I. 
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
 -Isrc -Iagg24/include -I. 
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
 -I/opt/local/include/freetype2 -I/opt/local/include -I. 
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 
-c src/backend_agg.cpp -o build/temp.macosx-10.7-x86_64-2.7/src/backend_agg.o
In file included from src/backend_agg.cpp:11:
In file included from src/_backend_agg.h:34:
agg24/include/agg_renderer_outline_aa.h:1368:45: error: binding of reference to 
type 'agg::line_profile_aa' to a value of type 'const agg::line_profile_aa' 
drops qualifiers
line_profile_aaprofile() { return *m_profile; }
^~
1 error generated.

error: command '/Developer/usr/bin/clang' failed with exit status 1

If I do:

CC=gcc python setup.py build

then things work fine, but I just wanted to raise the point that the C files do 
not compile successfully with clang at this time (but this seems to be the 
default compiler on 10.7).

Cheers,
Tom



--
VirtualizationCloud 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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Fwd: Matplotlib gallery

2012-02-23 Thread Filipe Pires Alvarenga Fernandes
Just a suggestion. All these ideas sounds like a google code-in task.

http://code.google.com/intl/pt-BR/opensource/gci/2010-11/

I do not know if Matplotlib participated in the past, if not take a
look of last years sympy task list:
https://github.com/sympy/sympy/wiki/GCI-2011-Task-list

If the ideas for the gallery improvement are break down to some simple
tasks like that you guys could use Google code-in to do it.

-Filipe

On Thu, Feb 23, 2012 at 11:46, Benjamin Root ben.r...@ou.edu wrote:


 On Thu, Feb 23, 2012 at 10:41 AM, Tony Yu tsy...@gmail.com wrote:



 On Thu, Feb 23, 2012 at 11:32 AM, josef.p...@gmail.com wrote:

 I will never get use to reply-all

 -- Forwarded message --
 From:  josef.p...@gmail.com
 Date: Thu, Feb 23, 2012 at 11:31 AM
 Subject: Re: [Matplotlib-users] Matplotlib gallery
 To: Nicolas Rougier nicolas.roug...@inria.fr


 On Thu, Feb 23, 2012 at 11:24 AM, Nicolas Rougier
 nicolas.roug...@inria.fr wrote:
 
 
  I agree, but the current matplotlib gallery is rather clueless about
  what the examples are related to until you click an image. I'm personally
  using the gallery by looking at an example that match what I've in mind 
  most
  closely and then look at the code. But you're right, some structure(s) 
  would
  definitely help.
 
  Here is an example of a well structured gallery:
  http://www.gigawiz.com/aagraphs.html.
 
  The first-level structure is organized at:
 
  Specialized Scientific Graphing
  Scatter Graphs
  Contour Charts (2-D, 3-D, and Ternary)
  Heatmaps
  Voronoi Diagram
  Waterfall Charts
  Bubble Charts
  Spider Charts
  Polar Charts
  Column and Bar Charts
  Area Charts
  Line Charts
  Combination Charts (Column-Line, Bar-Line, Area-Line)
  Diagrams of Multiple, Independent Value-Axes Column, Bar or Area Graphs
  High-Low, (Open)-High-Low-Close, and Range Charts
  Pie Charts and X-Y Scatter Pie
  Vector Charts
  Statistical Charts
 
 
  Maybe we can find/agree on similar structure(s)/sub-structure(s) and
  adapt it to the current gallery ?

 An advantage of the current all in one page gallery is that it is
 easier to find a recipe when I just look for individual plot elements,
 when I have not much idea what it might be called and just some idea
 what it should look like.

 That's different from looking for plots with a specific usage or content.

 Josef


 You could still have a one-page gallery with plots separated into
 subheadings (and a table of contents at the top which allows you to jump to
 subheadings). This alone would greatly improve navigation in the gallery.
 The list of headings is great, by the way.

 -Tony



 I am banging out a pull request to do just that.

 Ben Root


 --
 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
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Number of decimal places

2012-02-23 Thread Eric Firing
On 02/23/2012 01:13 AM, Nils Wagner wrote:
 Hi all,

 How can I increase the number of decimal places in yticks ?

One way is to install mpl from git master.  The ScalarFormatter handles 
this situation better now:

In [15]: print '\n'.join([tl.get_text() for tl in ax.get_yticklabels()])
$\mathdefault{0.052300}$
$\mathdefault{0.052305}$
$\mathdefault{0.052310}$
$\mathdefault{0.052315}$
$\mathdefault{0.052320}$
$\mathdefault{0.052325}$
$\mathdefault{0.052330}$
$\mathdefault{0.052335}$
$\mathdefault{0.052340}$
$\mathdefault{0.052345}$

Eric

 Nils

 from matplotlib.ticker import ScalarFormatter
 formatter = ScalarFormatter(useMathText=True,useOffset=False)
 formatter.set_scientific(True)
 formatter.set_powerlimits((-12,12))
 print dir (formatter)
 import matplotlib.pyplot as plt
 fig = plt.figure()
 ax = fig.add_subplot(111)
 ax.yaxis.set_major_formatter(formatter)

 import numpy as np

 A=np.array([[ 1 , 0.00E+00 , 5.234141E-06],
 [ 2 , 1.00E+00 , 5.233310E-06],
 [ 3 , 2.00E+00 , 5.232660E-06],
 [ 4 , 3.00E+00 , 5.231808E-06],
 [ 5 , 4.00E+00 , 5.231277E-06],
 [ 6 , 5.00E+00 , 5.230664E-06],
 [ 7 , 6.00E+00 , 5.230423E-06],
 [ 8 , 7.00E+00 , 5.230136E-06]])

 ax.plot(A[:,1],A[:,2])
 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
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Fwd: Matplotlib gallery

2012-02-23 Thread Benjamin Root
On Thu, Feb 23, 2012 at 10:55 AM, Filipe Pires Alvarenga Fernandes 
ocef...@gmail.com wrote:

 Just a suggestion. All these ideas sounds like a google code-in task.

 http://code.google.com/intl/pt-BR/opensource/gci/2010-11/

 I do not know if Matplotlib participated in the past, if not take a
 look of last years sympy task list:
 https://github.com/sympy/sympy/wiki/GCI-2011-Task-list

 If the ideas for the gallery improvement are break down to some simple
 tasks like that you guys could use Google code-in to do it.

 -Filipe


I have made a pull request to change gen_gallery.py to generate a gallery
page that breaks down the examples by sub directories.

https://github.com/matplotlib/matplotlib/pull/714

The idea would be that people can suggest new directories, get rid of
poorly named directories, and move around existing files.  The
gen_gallery.py would only need to update its list of sub-directories.
Also, examples/index.rst would also need to be updated, but maybe we can
get that page auto-generated as well?

Cheers!
Ben Root
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Changing the Dash Spacing?

2012-02-23 Thread Jeff Klukas
Hello all,

I would like to make small figures (about 3 wide) so that they are exactly
the right size for a LaTeX document I am preparing.  This should be
straightforward, but I fear I am running into inherent limitations in the
matplotlib design.

The particular problem is that the dash spacing for dashed lines seems to
be fixed to a certain number of points.  This looks fine for default figure
sizes, but in a small figure, the dash length becomes comparable to the
width of histogram bars I'm producing, so the output just looks like a
series of unrelated scribbles rather than a coherent histogram.

I've produced a short program below which gives a minimal demonstration of
the problem.

Is there some way to change the length of dashes?

Currently, I am hacking together a solution which involves making large
figures with huge font sizes, but I would much rather be able to match font
sizes exactly by making the figure the right size in the first place.

Many thanks,
Jeff

|| Jeff Klukas, Physics
|| University of Wisconsin
|| http://jeff.klukas.net

-
import matplotlib.pyplot as plt

fig = plt.figure(figsize=(6,4))
plt.plot(range(20), range(20), linestyle='steps--')
plt.savefig('dashdemo')

fig = plt.figure(figsize=(3,2))
plt.plot(range(20), range(20), linestyle='steps--')
plt.savefig('dashdemosmall')
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Possible to make linewidth larger in Legend?

2012-02-23 Thread Jonno
I need to use a small linewidth in my plot but the color is still very
clear. However in the legend the small, thin straight line makes it
difficult to tell the color. Is there a way to make the linewidth larger
just in the legend but not on the plot?
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Changing the Dash Spacing?

2012-02-23 Thread Eric Firing
On 02/23/2012 10:46 AM, Jeff Klukas wrote:
 Hello all,

 I would like to make small figures (about 3 wide) so that they are
 exactly the right size for a LaTeX document I am preparing.  This should
 be straightforward, but I fear I am running into inherent limitations in
 the matplotlib design.

 The particular problem is that the dash spacing for dashed lines seems
 to be fixed to a certain number of points.  This looks fine for default
 figure sizes, but in a small figure, the dash length becomes comparable
 to the width of histogram bars I'm producing, so the output just looks
 like a series of unrelated scribbles rather than a coherent histogram.

 I've produced a short program below which gives a minimal demonstration
 of the problem.

 Is there some way to change the length of dashes?

 Currently, I am hacking together a solution which involves making large
 figures with huge font sizes, but I would much rather be able to match
 font sizes exactly by making the figure the right size in the first place.

 Many thanks,
 Jeff

 || Jeff Klukas, Physics
 || University of Wisconsin
 || http://jeff.klukas.net

 -
 import matplotlib.pyplot as plt

 fig = plt.figure(figsize=(6,4))
line, = plt.plot(range(20), range(20), linestyle='steps--')
line.set_dashes((3,2)) # or whatever on/off sequence in points you want

Eric


 plt.savefig('dashdemo')

 fig = plt.figure(figsize=(3,2))
 plt.plot(range(20), range(20), linestyle='steps--')
 plt.savefig('dashdemosmall')



 --
 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
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users