Re: [Matplotlib-users] mplot3d scatter3d marker sizes?

2010-01-18 Thread Matthias Michler
Hi Erik,

with current svn I see markers of different size. What version of matplotlib 
you are using?

Kind regards,
Matthias

On Monday 18 January 2010 21:38:25 Erik Tollerud wrote:
> Is there a way to change the sizes of scatter plot markers for
> mplot3d.Axes3D.scatter3d ? I do
>
> from mpl_toolkits.mplot3d import Axes3D
> ax = Axes3D(gcf())
>
> x,y,z = randn(3,20)
> ax.scatter(x,y,z,s=30*rand(20))
>
> and I expect to see 20 points of a range of sizes from 1 to 30... but
> instead I see them all the same size.  How can I set the size of the
> markers?


--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Annotate Behaviour - Arrows Missing

2010-01-18 Thread Kurt Forrester

JJ thanks for the tip unfortunately there was no change.

I modified the script for the hax. annotate(...) to include the 
annotate_clip=False, however there is no change in the behaviour of the arrows. 
They are not visible until the xy=(a,b) have values for "a" and "b" that are 
both greater than their respective origin values (0,0), otherwise they remain 
clipped. I tested this by replacing the "true" value with (1.0e-10,1.0e-10) 
resulting in the arrow becoming visible. This is a feasible work around for 
this instance but it may not suit all applications. 

Is anybody else experiencing the same issue? Is there another setting that I my 
tweak to overcome this?

Kind Regards,

Kurt

> From: lee.j.j...@gmail.com
> Date: Mon, 18 Jan 2010 19:18:31 -0500
> Subject: Re: [Matplotlib-users] Annotate Behaviour - Arrows Missing
> To: kurtforres...@hotmail.com
> CC: matplotlib-users@lists.sourceforge.net
> 
> This is the feature that is not properly documented.
> You should call annotate with optional keyword
> 
> annotation_clip=False,
> 
> See below for the details.
> 
> http://matplotlib.sourceforge.net/api/artist_api.html?highlight=annotation#matplotlib.text.Annotation.set_annotation_clip
> 
> I'll fix the documentation.
> Regards,
> 
> -JJ
> 
> 
> On Mon, Jan 18, 2010 at 6:19 PM, Kurt Forrester
>  wrote:
> > Ubuntu Karmic
> > matplotlib from repository
> > Python 2.6.4 (r264:75706, Dec  7 2009, 18:45:15)
> > [GCC 4.4.1] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
>  import matplotlib as mpl
>  mpl.__version__
> > '0.99.0'
> >
> > Running the leach_kinetics.py script and annotating the graph should display
> > two annotations indicating the position of relevant phenomena. However,
> > attached are two outputs, 1) as_script.pdf shows the output of the script
> > (note the missing annotations) and 2) a panned image showing the presence of
> > the annotation when the origin is moved into the visible area of the axes.
> >
> > There seems to be some strange clipping behaviour (not too sure if that is
> > the correct term) with respect the the drawing (or not) of the arrow. It
> > appears that if the arrow begins or ends on the axes then it is not drawn.
> > Verification of this and tips for a matplotlib tweak to prevent it from
> > happening would also be appreciated?
> >
> > Kind Regards,
> >
> > Kurt
> >
> > 
> > If It Exists, You'll Find it on SEEK Shopping Trolley Mechanic
> > --
> > Throughout its 18-year history, RSA Conference consistently attracts the
> > world's best and brightest in the field, creating opportunities for
> > Conference
> > attendees to learn about information security's most important issues
> > through
> > interactions with peers, luminaries and emerging and established companies.
> > http://p.sf.net/sfu/rsaconf-dev2dev
> > ___
> > Matplotlib-users mailing list
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
  
_
Video chat with Windows Live Messenger Learn how
http://windowslive.ninemsn.com.au/messenger/article/870686/video-chat-with-messenger--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Annotate Behaviour - Arrows Missing

2010-01-18 Thread Jae-Joon Lee
This is the feature that is not properly documented.
You should call annotate with optional keyword

annotation_clip=False,

See below for the details.

http://matplotlib.sourceforge.net/api/artist_api.html?highlight=annotation#matplotlib.text.Annotation.set_annotation_clip

I'll fix the documentation.
Regards,

-JJ


On Mon, Jan 18, 2010 at 6:19 PM, Kurt Forrester
 wrote:
> Ubuntu Karmic
> matplotlib from repository
> Python 2.6.4 (r264:75706, Dec  7 2009, 18:45:15)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
 import matplotlib as mpl
 mpl.__version__
> '0.99.0'
>
> Running the leach_kinetics.py script and annotating the graph should display
> two annotations indicating the position of relevant phenomena. However,
> attached are two outputs, 1) as_script.pdf shows the output of the script
> (note the missing annotations) and 2) a panned image showing the presence of
> the annotation when the origin is moved into the visible area of the axes.
>
> There seems to be some strange clipping behaviour (not too sure if that is
> the correct term) with respect the the drawing (or not) of the arrow. It
> appears that if the arrow begins or ends on the axes then it is not drawn.
> Verification of this and tips for a matplotlib tweak to prevent it from
> happening would also be appreciated?
>
> Kind Regards,
>
> Kurt
>
> 
> If It Exists, You'll Find it on SEEK Shopping Trolley Mechanic
> --
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for
> Conference
> attendees to learn about information security's most important issues
> through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] [matplotlib-users] Figure dimensions issues

2010-01-18 Thread Damon McDougall
Hi all,

I'm using the PDF backend and I'm mucking around with the figure width and 
height settings to try and get the label text size equal to that of the tex in 
a LaTeX report I'm writing. The following code set my dimensions:

FACTOR = 1.0
fig_width_pt  = 483.69687 * FACTOR   # figure width in pt as returned by 
\showthe in LaTeX multiplied by a factor
inches_per_pt = 1.0/72.27
golden_ratio  = (np.sqrt(5) - 1.0) / 2.0
fig_width_in  = fig_width_pt * inches_per_pt
fig_height_in = fig_width_in * golden_ratio
fig_dims  = [fig_width_in, fig_height_in]

matplotlib.use('PDF')
matplotlib.rc('font',**{'family':'serif','serif':['Computer Modern Roman']})
matplotlib.rc('text', usetex=True)
matplotlib.rc('axes', labelsize=8)
matplotlib.rc('legend', fontsize=8)
matplotlib.rc('xtick', labelsize=8)
matplotlib.rc('ytick', labelsize=8)
matplotlib.rc('font', size=8)
matplotlib.rc('figure', figsize=fig_dims)

I then plot my data, all is fine until I realised that the saved PDF uses a 
generous amount of whitespace around the edge of the figure. I get rid of the 
whitespace by calling savefig with a few extra arguments:

fig2.savefig('errors.pdf', bbox_inches='tight', pad_inches=0.03)

For about 18 months now I've been under the illusion that this produces a 
figure whose labels are actually size 8 text. This is not the case (after 
import into LaTeX) since the axing of the whitespace has been done in such a 
way that the figure does not take up the available space. The figure is 
actually cropped. So when it's imported into LaTeX the figure is actually blown 
up (slightly) due to the cropping.

Is there another way around this that will get rid of the whitespace and have 
the physical figure be 483.69687pt wide?

Any help would be greatly appreciated.

Regards,
-- Damon

--
Damon McDougall
Mathematics Institute
University of Warwick
Coventry
CV4 7AL
d.mcdoug...@warwick.ac.uk


--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problem with import pylab

2010-01-18 Thread Christoph Gohlke
The extension _TKAGG.PYD depends on TK84.DLL, TCL84.DLL, MSVCP71.DLL, 
and MSVCR71.DLL. Make sure all these files are located in the Windows 
search path, e.g. in one of the directories listed in the PATH 
environment variable.

Christoph

On 1/18/2010 1:45 PM, H L wrote:
>
> Thanks. I ran the Simple Hello World program (section 25.1.2.2 at
> http://docs.python.org/library/tkinter.html) without any problem, so I
> guess Tk installation itself is ok.
> Someone has experience with getting matplotlib work with Tk?
>
>
> --- On *Sun, 1/17/10, Erik Tollerud //* wrote:
>
>
> From: Erik Tollerud 
> Subject: Re: [Matplotlib-users] problem with import pylab
> To: "H L" 
> Date: Sunday, January 17, 2010, 9:18 PM
>
> Just based on the traceback, the problem seems to be in Tk - does
> anything in tk work for you? (e.g. any of the builtin python gui
> stuff) You might try installing wx and changing your matplotlibrc
> file to have the line "backend:WxAgg" in it. I've never tried using
> the wx backend on windows (anyone done this?), but presumably it
> should work...
>
> On Fri, Jan 15, 2010 at 5:47 PM, H L  > wrote:
>
> Hello:
> I am having problem with "import pylab". I attached the
> traceback below. I have googled on the web but haven't found a
> solution. Can someone here help?
> I have ActivePython 2.5, numpy-1.4.0-win32, and
> matplotlib-0.99.1.win32-py2.5.exe, and Windows XP SP3.
> --
> Traceback (most recent call last):
> File "", line 1, in 
> File "C:\Python25\lib\site-packages\pylab.py", line 1, in 
> from matplotlib.pylab import *
> File "C:\Python25\lib\site-packages\matplotlib\pylab.py", line
> 247, in 
> from matplotlib.pyplot import *
> File "C:\Python25\lib\site-packages\matplotlib\pyplot.py", line
> 78, in 
> new_figure_manager, draw_if_interactive, show = pylab_setup()
> File
> "C:\Python25\lib\site-packages\matplotlib\backends\__init__.py",
> line 25, in pylab_setup
> globals(),locals(),[backend_name])
> File
> "C:\Python25\lib\site-packages\matplotlib\backends\backend_tkagg.py",
> line 8, in 
> import tkagg # Paint image to Tk photo blitter extension
> File
> "C:\Python25\lib\site-packages\matplotlib\backends\tkagg.py",
> line 1, in 
> import _tkagg
> ImportError: DLL load failed: The specified module could not be
> found.
> Thanks.
> HL
>
>
>
> 
> --
> Throughout its 18-year history, RSA Conference consistently
> attracts the
> world's best and brightest in the field, creating opportunities
> for Conference
> attendees to learn about information security's most important
> issues through
> interactions with peers, luminaries and emerging and established
> companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> 
> 
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
>
>
> --
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for Conference
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
>
>
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Using a table as a legend, ugly text output?

2010-01-18 Thread ashleyd

I'm trying to figure out if it's possible to use a table as a legend of
sorts, as I have a very busy graph I'm trying to describe.

Basically:
- I'm visualizing data from a series of similar but not-quite-identical
simulations
- I'd like to have the simulation parameters displayed in a table format,
with an example line from the graph next to each row

So, I might have rows that look like:
"Line", "Alpha", "Beta"...
"-" , "0.125",  "2.0"
"- - -",  "0.120",  "2.0"

The problem is I can't figure out how to include a line "sample" like what's
included with the legend in a table, and I can't figure out how to make
legend entries that don't have any lines.  I suspect that I could make a
dummy white plot, and use that for my data entries in a legend and make a
legend-table hybrid that way.  However, I think using a table would be
cleaner and look nicer.

Does anyone have any ideas as to how to get this working?

While I'm posting, another quick question -- my text output looks really
shoddy, even at high DPIs.  It looks like somebody took a screenshot of a
tiny font and scaled it up with a linear filter.  I have freetype installed,
and the matplotlib build script outputs the following, if it's helpful:

BUILDING MATPLOTLIB
matplotlib: 0.99.1.1
python: 2.5.4 (r254:67916, Apr  4 2009, 17:56:17)  [GCC
4.3.3]
  platform: linux2

REQUIRED DEPENDENCIES
 numpy: 1.2.1
 freetype2: 9.20.3

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.27
   Tkinter: Tkinter: 67737, Tk: 8.5, Tcl: 8.5
  wxPython: 2.8.9.1
* WxAgg extension not required for wxPython >= 2.8
  Gtk+: gtk+: 2.16.1, glib: 2.20.1, pygtk: 2.14.1,
pygobject: 2.16.1
   Mac OS X native: no
Qt: no
   Qt4: no
 Cairo: 1.4.12

OPTIONAL DATE/TIMEZONE DEPENDENCIES
  datetime: present, version unknown
  dateutil: 1.4.1
  pytz: 2008h

OPTIONAL USETEX DEPENDENCIES
dvipng: 1.11
   ghostscript: 8.64
 latex: 3.141592
   pdftops: 0.10.5

Thank you in advance for any advice!

-Ashley
-- 
View this message in context: 
http://old.nabble.com/Using-a-table-as-a-legend%2C-ugly-text-output--tp27206248p27206248.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problem with import pylab

2010-01-18 Thread H L
Thanks. I ran the Simple Hello World program  (section 25.1.2.2 at 
http://docs.python.org/library/tkinter.html) without any problem, so I guess Tk 
installation itself is ok.
 
Someone has experience with getting matplotlib work with Tk?
 
 


--- On Sun, 1/17/10, Erik Tollerud  wrote:


From: Erik Tollerud 
Subject: Re: [Matplotlib-users] problem with import pylab
To: "H L" 
Date: Sunday, January 17, 2010, 9:18 PM


Just based on the traceback, the problem seems to be in Tk - does anything in 
tk work for you? (e.g. any of the builtin python gui stuff)  You might try 
installing wx and changing your matplotlibrc file to have the line 
"backend:WxAgg" in it.  I've never tried using the wx backend on windows 
(anyone done this?), but presumably it should work...


On Fri, Jan 15, 2010 at 5:47 PM, H L  wrote:






Hello:
 
I am having problem with "import pylab". I attached the traceback below. I have 
googled on the web but haven't found a solution. Can someone here help?
 
I have ActivePython 2.5, numpy-1.4.0-win32, and 
matplotlib-0.99.1.win32-py2.5.exe, and Windows XP SP3.
--
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python25\lib\site-packages\pylab.py", line 1, in 
    from matplotlib.pylab import *
  File "C:\Python25\lib\site-packages\matplotlib\pylab.py", line 247, in 

    from matplotlib.pyplot import *
  File "C:\Python25\lib\site-packages\matplotlib\pyplot.py", line 78, in 

    new_figure_manager, draw_if_interactive, show = pylab_setup()
  File "C:\Python25\lib\site-packages\matplotlib\backends\__init__.py", line 
25, in pylab_setup
    globals(),locals(),[backend_name])
  File "C:\Python25\lib\site-packages\matplotlib\backends\backend_tkagg.py", 
line 8, in 
    import tkagg # Paint image to Tk photo blitter extension
  File "C:\Python25\lib\site-packages\matplotlib\backends\tkagg.py", line 1, in 

    import _tkagg
ImportError: DLL load failed: The specified module could not be found.
 
Thanks. 
 
HL

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users





  --
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Size of text for axes title

2010-01-18 Thread Jae-Joon Lee
http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels

The above example is for ticklabels, but can be easily adopted for axes title.

Regards,

-JJ


On Mon, Jan 18, 2010 at 12:07 PM, Jeremy Lewi  wrote:
> Hi,
>
>
>
> The title for my axes is being cutoff because the axes is taking up too much
> space. Is there anyway to determine how much space is needed for the title
> so that I can set the axes size to the correct height to prevent the title
> from being cutoff?
>
>
>
> Thanks
>
>
>
> Jeremy Lewi
>
> Engineering Scientist
>
> The Intellisis Corporation
>
> jl...@intellisis.com
>
>
>
> --
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for
> Conference
> attendees to learn about information security's most important issues
> through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] mplot3d scatter3d marker sizes?

2010-01-18 Thread Erik Tollerud
Is there a way to change the sizes of scatter plot markers for
mplot3d.Axes3D.scatter3d ? I do

from mpl_toolkits.mplot3d import Axes3D
ax = Axes3D(gcf())

x,y,z = randn(3,20)
ax.scatter(x,y,z,s=30*rand(20))

and I expect to see 20 points of a range of sizes from 1 to 30... but
instead I see them all the same size.  How can I set the size of the
markers?

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Size of text for axes title

2010-01-18 Thread Jeremy Lewi
Hi,

 

The title for my axes is being cutoff because the axes is taking up too much
space. Is there anyway to determine how much space is needed for the title
so that I can set the axes size to the correct height to prevent the title
from being cutoff?

 

Thanks

 

Jeremy Lewi

Engineering Scientist

The Intellisis Corporation

jl...@intellisis.com

 

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users