[Matplotlib-users] ANN: SciPy 2009 student sponsorship

2009-06-29 Thread Jarrod Millman
I am pleased to announce that the Python Software Foundation is
sponsoring 10 students' travel, registration, and accommodation for
the SciPy 2009 conference (Aug. 18-23).  The focus of the conference
is both on scientific libraries and tools developed with Python and on
scientific or engineering achievements using Python.  If you're in
college or a graduate program, please check out the details here:
http://conference.scipy.org/student-funding

About the conference


SciPy 2009, the 8th Python in Science conference, will be held from
August 18-23, 2009 at Caltech in Pasadena, CA, USA.  The conference
starts with two days of tutorials to the scientific Python tools.
There will be two tracks, one for introduction of the basic tools to
beginners, and one for more advanced tools.  The tutorials will be
followed by two days of talks.  Both days of talks will begin with a
keynote address.  The first day’s keynote will be given by Peter
Norvig, the Director of Research at Google; while, the second keynote
will be delivered by Jon Guyer, a Materials Scientist in the
Thermodynamics and Kinetics Group at NIST.  The program committee will
select the remaining talks from submissions to our call for papers.
All selected talks will be included in our conference proceedings
edited by the program committee.  After the talks each day we will
provide several rooms for impromptu birds of a feather discussions.
Finally, the last two days of the conference will be used for a number
of coding sprints on the major software projects in our community.

For the 8th consecutive year, the conference will bring together the
developers and users of the open source software stack for scientific
computing with Python.  Attendees have the opportunity to review the
available tools and how they apply to specific problems.  By providing
a forum for developers to share their Python expertise with the wider
commercial, academic, and research communities, this conference
fosters collaboration and facilitates the sharing of software
components, techniques, and a vision for high level language use in
scientific computing.

For further information, please visit the conference homepage:
http://conference.scipy.org.

Important Dates
---

* Friday, July 3: Abstracts Due
* Friday, July 10: Announce accepted talks, post schedule
* Friday, July 10: Early Registration ends
* Tuesday-Wednesday, August 18-19: Tutorials
* Thursday-Friday, August 20-21: Conference
* Saturday-Sunday, August 22-23: Sprints
* Friday, September 4: Papers for proceedings due

Executive Committee
---

* Jarrod Millman, UC Berkeley, USA (Conference Chair)
* Gaël Varoquaux, INRIA Saclay, France (Program Co-Chair)
* Stéfan van der Walt, University of Stellenbosch, South Africa
(Program Co-Chair)
* Fernando Pérez, UC Berkeley, USA (Tutorial Chair)

--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] setting figure font to helvetica

2009-06-29 Thread Jouni K . Seppänen
per freem perfr...@gmail.com writes:

 i am trying to use the Helvetica font on matplotlib. i am using mac os x (so
 i definitely have helvetica installed) 

It might be in a format that matplotlib doesn't really handle. However,
Helvetica is one of the core fonts in PDF so if you set
pdf.use14corefonts to True, you should be able to use Helvetica, and the
reader application will supply the font (or approximate it with
something else). This is deprecated in the latest version of the spec,
but it should work just fine.

 i verified that plt.rcParams gets modified to use 'Helvetica' as the value
 for font.family, etc. but i still get the default font used in all of these
 figures. 

 I just wanted to add: if i simply set the font to Arial, using
 
 rc('font',**{'family':'sans-serif','sans-serif':['Arial']})
 
 then it works. But the same call with Helvetica still defaults to that
 Bitstream/default font of matplotlib. any idea why this might be? could
 matplotlib be confusing helvetica with bitstream?

The font-selection system is somewhat complicated. I suggest running
your script with --verbose-debug with both Arial and Helvetica as the
value of font.sans-serif, and diffing the outputs to see what is going
on. I suspect that Arial is a TTF file while Helvetica is in some
Mac-specific format. The best solution would be to make matplotlib
handle those formats, but probably the most practical solution is to
use something like fondu to convert the font into TTF:
http://fondu.sourceforge.net/

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Dynamic plotting?

2009-06-29 Thread guillaume ranquet
Hi list

I've been asked to transform my app to something more dynamic
it currently reads an xml file, it has now to read a stream of xml from
a socket (I can handle this part :D) and plot each point as they are
coming from the network.

I'll end up having tons of points over multiple axes; I guess doing
sonething like fig.plot(concat(old-data,new-point)) would be rather
inefficient and I wonder if someone ever made something like this using
matplotlib?

or any hints on where to start from?

thanks :)

This message contains confidential information and may contain information that 
is legally privileged.  If you have received this message by mistake, please 
immediately notify us and delete the original message. Thank you.  

Ce message contient des informations confidentielles.  S'il vous est parvenu 
par erreur, merci de bien vouloir nous en aviser par retour, de n'en faire 
aucun usage et de n'en garder aucune copie.


--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Zooming plot and transforms...

2009-06-29 Thread Fabrice Silva
Hello everybody,
I wonder whether it is possible to produce something like the zooming
plot example from http://code.enthought.com/projects/chaco/gallery.php
using only matplotlib. I've done some tests, I think transforms may be
helpful but I do not know ho to use them...



--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Dynamic plotting?

2009-06-29 Thread Sandro Tosi
Hello guillaume,

On Mon, Jun 29, 2009 at 10:53, guillaume ranquetgranq...@wyplay.com wrote:
 I've been asked to transform my app to something more dynamic
 it currently reads an xml file, it has now to read a stream of xml from
 a socket (I can handle this part :D) and plot each point as they are
 coming from the network.

 I'll end up having tons of points over multiple axes; I guess doing
 sonething like fig.plot(concat(old-data,new-point)) would be rather
 inefficient and I wonder if someone ever made something like this using
 matplotlib?

You can refer to animation examples [1] for code that does what you want.

[1] http://matplotlib.sourceforge.net/examples/animation/index.html

at the very end, you update the line data with set_ydata() ,
set_xdata() or set_data() and then call a draw() on the figure.

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Dynamic plotting?

2009-06-29 Thread guillaume ranquet
Sandro Tosi wrote:
 Hello guillaume,
 
 On Mon, Jun 29, 2009 at 10:53, guillaume ranquetgranq...@wyplay.com wrote:
 I've been asked to transform my app to something more dynamic
 it currently reads an xml file, it has now to read a stream of xml from
 a socket (I can handle this part :D) and plot each point as they are
 coming from the network.

 I'll end up having tons of points over multiple axes; I guess doing
 sonething like fig.plot(concat(old-data,new-point)) would be rather
 inefficient and I wonder if someone ever made something like this using
 matplotlib?
 
 You can refer to animation examples [1] for code that does what you want.
 
 [1] http://matplotlib.sourceforge.net/examples/animation/index.html
 
 at the very end, you update the line data with set_ydata() ,
 set_xdata() or set_data() and then call a draw() on the figure.
 
 Regards,


oh, I knew about set_{x,y,}data() but I actually though I had to feed it
the whole dataset each time.
It's clear enough in the examples :)

maybe the doc should be a bit more verbose?
http://matplotlib.sourceforge.net/api/artist_api.html?highlight=set_ydata#matplotlib.lines.Line2D.set_ydata


thanks.

This message contains confidential information and may contain information that 
is legally privileged.  If you have received this message by mistake, please 
immediately notify us and delete the original message. Thank you.  

Ce message contient des informations confidentielles.  S'il vous est parvenu 
par erreur, merci de bien vouloir nous en aviser par retour, de n'en faire 
aucun usage et de n'en garder aucune copie.


--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Zooming plot and transforms...

2009-06-29 Thread Fabrice Silva
Le lundi 29 juin 2009 à 07:51 -0400, Pierre GM a écrit :
 Check the plotting routines in scikits.timeseries  
 (pytseries.sourceforge.net), there's some zooming functions that could  
 get you started.

Thanks to point to this scikit, but I looked into the lib.plotlib
module, and I didn't manage to find something looking like the 'zoom
effect' Chaco provides...

I merely wanted to add a Polygon patch between the upper and the lower
subplots, but using data coordinates from these axes.
-- 
Fabrice Silva si...@lma.cnrs-mrs.fr
LMA UPR CNRS 7051


--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] subplots with no space between limited to 6x6?

2009-06-29 Thread keflavich

Hi, I'm trying to make a large grid of subplots with no spacing between.  The
following code fails for any grid size larger than 6x6 by skipping a row and
a column.

for i in xrange(1,65):
subplot(8,8,i)
plot( [0,1] )
subplots_adjust(hspace=0,wspace=0)

Is there a way around this problem?

Thanks,
Adam
-- 
View this message in context: 
http://www.nabble.com/subplots-with-no-space-between-limited-to-6x6--tp24255224p24255224.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] subplots with no space between limited to 6x6?

2009-06-29 Thread Jae-Joon Lee
Yes, I can reproduce this with the current svn.

I think what's happening is that, with larger number of grid,  there
is slight overlapping between each subplots (likely due to the
floating point error). Note that subplot command deletes existing axes
if they overlap with the new one.

There would be several work-arounds. You may use non-zero spacing, eg,
0.001  worked for me. Or, you may manually add subplots to the figure
to avoid any deletion of existing axes.

from matplotlib.axes import Subplot

fig = gcf()

subplots_adjust(hspace=0.,wspace=0.)

for i in xrange(1,65):
ax = Subplot(fig, 8, 8, i)
fig.add_subplot(ax)
plot( [0,1] )

Regards,

-JJ


On Mon, Jun 29, 2009 at 10:29 AM, keflavichkeflav...@gmail.com wrote:

 Hi, I'm trying to make a large grid of subplots with no spacing between.  The
 following code fails for any grid size larger than 6x6 by skipping a row and
 a column.

 for i in xrange(1,65):
    subplot(8,8,i)
    plot( [0,1] )
    subplots_adjust(hspace=0,wspace=0)

 Is there a way around this problem?

 Thanks,
 Adam
 --
 View this message in context: 
 http://www.nabble.com/subplots-with-no-space-between-limited-to-6x6--tp24255224p24255224.html
 Sent from the matplotlib - users mailing list archive at Nabble.com.


 --
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] subplots with no space between limited to 6x6?

2009-06-29 Thread Adam
Thanks Jae-Joon, that worked.

Adam

On Mon, Jun 29, 2009 at 9:03 AM, Jae-Joon Leelee.j.j...@gmail.com wrote:
 Yes, I can reproduce this with the current svn.

 I think what's happening is that, with larger number of grid,  there
 is slight overlapping between each subplots (likely due to the
 floating point error). Note that subplot command deletes existing axes
 if they overlap with the new one.

 There would be several work-arounds. You may use non-zero spacing, eg,
 0.001  worked for me. Or, you may manually add subplots to the figure
 to avoid any deletion of existing axes.

 from matplotlib.axes import Subplot

 fig = gcf()

 subplots_adjust(hspace=0.,wspace=0.)

 for i in xrange(1,65):
    ax = Subplot(fig, 8, 8, i)
    fig.add_subplot(ax)
    plot( [0,1] )

 Regards,

 -JJ


 On Mon, Jun 29, 2009 at 10:29 AM, keflavichkeflav...@gmail.com wrote:

 Hi, I'm trying to make a large grid of subplots with no spacing between.  The
 following code fails for any grid size larger than 6x6 by skipping a row and
 a column.

 for i in xrange(1,65):
    subplot(8,8,i)
    plot( [0,1] )
    subplots_adjust(hspace=0,wspace=0)

 Is there a way around this problem?

 Thanks,
 Adam
 --
 View this message in context: 
 http://www.nabble.com/subplots-with-no-space-between-limited-to-6x6--tp24255224p24255224.html
 Sent from the matplotlib - users mailing list archive at Nabble.com.


 --
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Zooming plot and transforms...

2009-06-29 Thread Gökhan SEVER
On Mon, Jun 29, 2009 at 7:39 AM, Fabrice Silvasi...@lma.cnrs-mrs.fr wrote:
 Le lundi 29 juin 2009 à 07:51 -0400, Pierre GM a écrit :
 Check the plotting routines in scikits.timeseries
 (pytseries.sourceforge.net), there's some zooming functions that could
 get you started.

 Thanks to point to this scikit, but I looked into the lib.plotlib
 module, and I didn't manage to find something looking like the 'zoom
 effect' Chaco provides...

 I merely wanted to add a Polygon patch between the upper and the lower
 subplots, but using data coordinates from these axes.
 --

I have been wondering the same issue whether Chaco's nice zoom plot
could be made possible in Matplotlib. I don't have an answer for this
yet. If you come up with one, please let me know.

In the mean time, you can take a look at: http://www.simile-widgets.org/

They have some interesting and eye-catching time-series plots for
web-demonstrations.

Gökhan

--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Zooming plot and transforms...

2009-06-29 Thread Fabrice Silva
Le lundi 29 juin 2009 à 14:39 +0200, Fabrice Silva a écrit :
 I merely wanted to add a Polygon patch between the upper and the lower
 subplots, but using data coordinates from these axes.

One more precision : my intent is to draw a figure 'statically', I do
not need event handling, ie handling manual zoom through an interactive
backend. The figure is generated from a script and directly saved
without human interaction.
-- 
Fabrice Silva si...@lma.cnrs-mrs.fr
LMA UPR CNRS 7051


--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Zooming plot and transforms...

2009-06-29 Thread Ryan May
On Mon, Jun 29, 2009 at 12:12 PM, Gökhan SEVER gokhanse...@gmail.comwrote:

 On Mon, Jun 29, 2009 at 7:39 AM, Fabrice Silvasi...@lma.cnrs-mrs.fr
 wrote:
  Le lundi 29 juin 2009 à 07:51 -0400, Pierre GM a écrit :
  Check the plotting routines in scikits.timeseries
  (pytseries.sourceforge.net), there's some zooming functions that could
  get you started.
 
  Thanks to point to this scikit, but I looked into the lib.plotlib
  module, and I didn't manage to find something looking like the 'zoom
  effect' Chaco provides...
 
  I merely wanted to add a Polygon patch between the upper and the lower
  subplots, but using data coordinates from these axes.
  --

 I have been wondering the same issue whether Chaco's nice zoom plot
 could be made possible in Matplotlib. I don't have an answer for this
 yet. If you come up with one, please let me know.


Have you looked at the examples/widgets/span_selector.py demo?

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Zooming plot and transforms...

2009-06-29 Thread Jae-Joon Lee
I think the issue here is to connect points in two different axes,
which is possible but can be a bit difficult.

In the svn version of matplotlib, there are some helper classes to
ease this job a bit.
I'm attaching the example.

I think you can also run the example with 0.98.5.3. Just download
inset_locator.py and modify your import statement.

http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/mpl_toolkits/axes_grid/inset_locator.py?revision=7084view=markup

Regards,

-JJ


On Mon, Jun 29, 2009 at 1:22 PM, Fabrice Silvasi...@lma.cnrs-mrs.fr wrote:
 Le lundi 29 juin 2009 à 14:39 +0200, Fabrice Silva a écrit :
 I merely wanted to add a Polygon patch between the upper and the lower
 subplots, but using data coordinates from these axes.

 One more precision : my intent is to draw a figure 'statically', I do
 not need event handling, ie handling manual zoom through an interactive
 backend. The figure is generated from a script and directly saved
 without human interaction.
 --
 Fabrice Silva si...@lma.cnrs-mrs.fr
 LMA UPR CNRS 7051


 --
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

attachment: demo.png
Demonstrate the use of the BboxPatch, BboxConnector.

Note that the example does not work correctly if the figure size changes interactively.


import matplotlib.pyplot as plt
from matplotlib.path import Path
from matplotlib.transforms import blended_transform_factory, TransformedBbox
from mpl_toolkits.axes_grid.inset_locator import BboxPatch, BboxConnector




class BboxConnectorPatch(BboxConnector):

def __init__(self, bbox1, bbox2, loc1a, loc2a, loc1b, loc2b, **kwargs):
if transform in kwargs:
raise ValueError(trnasform should nt be set)

BboxConnector.__init__(self, bbox1, bbox2, loc1a, loc2a, **kwargs)
self.loc1b = loc1b
self.loc2b = loc2b


def get_path(self):
path1 = self.connect_bbox(self.bbox1, self.bbox2,
  self.loc1, self.loc2)

path2 = self.connect_bbox(self.bbox2, self.bbox1,
  self.loc2b, self.loc1b)

path_merged = list(path1.vertices) + list (path2.vertices) + [path1.vertices[0]]

return Path(path_merged)


if 1:

ax1 = plt.subplot(211)
ax2 = plt.subplot(212)


#def update_transform(fig):

# add bbox in upper axes (ax1)
tt = ax2.transScale + ax2.transLimits + ax1.transAxes
trans = blended_transform_factory(ax1.transData, tt)

mybbox = TransformedBbox(ax2.viewLim, trans)
bbox_patch = BboxPatch(mybbox, alpha=0.2)
ax1.add_patch(bbox_patch)


# add connecting lines in lower axes (ax2)

patch_props=dict(ec=b, alpha=0.5)


# connect lower-left corner (loc1=3) of mybbox to upper-left
# corner (loc2=2) of ax2.bbox
c1 = BboxConnector(mybbox, ax2.bbox, loc1=3, loc2=2, **patch_props)
c1.set_clip_on(False)
ax2.add_patch(c1)

# connect lower-right corner (loc1=4) of mybbox to upper-right
# corner (loc2=1) of ax2.bbox
c2 = BboxConnector(mybbox, ax2.bbox, loc1=4, loc2=1, **patch_props)
c2.set_clip_on(False)
ax2.add_patch(c2)

# a polygon patch.
p = BboxConnectorPatch(mybbox, ax2.bbox,
   loc1a=3, loc2a=2,
   loc1b=4, loc2b=1,
   fc=b, ec=none, alpha=0.1)
p.set_clip_on(False)
ax2.add_patch(p)

# adjust the xlim
ax2.set_xlim(0.3, 0.5)

ax1.set_title(try pan/zoom each axes)
plt.show()

--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] setting figure font to helvetica

2009-06-29 Thread per freem
hi all,

I am not sure if I have helvetica installed as a TTF -- how can i install it
if i don't?

i followed the debug suggestion and here are the results. when i set the
font to arial, using:

from matplotlib import rc
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})

then the relevant output i get using --verbose-debug is:

matplotlib version 0.98.5.2
Using fontManager instance from /Users/perf/.matplotlib/fontList.cache
backend pdf version unknown
findfont: Matching
:family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium
to Arial (/Library/Fonts/Arial.ttf) with score of 0.00
findfont: Matching
:family=STIXGeneral:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXGeneral
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXGeneral.ttf)
with score of 0.00
findfont: Matching
:family=STIXNonUnicode:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0
to STIXNonUnicode
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXNonUniBol.ttf)
with score of 0.00
findfont: Matching
:family=STIXGeneral:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0
to STIXGeneral
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXGeneralBol.ttf)
with score of 0.00
findfont: Matching
:family=STIXSize3:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXSize3
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXSiz3Sym.ttf)
with score of 0.00
findfont: Matching
:family=STIXSize4:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXSize4
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXSiz4Sym.ttf)
with score of 0.00
findfont: Matching
:family=STIXSize5:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXSize5
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXSiz5Sym.ttf)
with score of 0.00
findfont: Matching
:family=STIXSize1:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXSize1
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXSiz1Sym.ttf)
with score of 0.00
findfont: Matching
:family=STIXSize2:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXSize2
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXSiz2Sym.ttf)
with score of 0.00
findfont: Matching
:family=STIXGeneral:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXGeneral
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXGeneralItalic.ttf)
with score of 0.00
findfont: Matching
:family=STIXNonUnicode:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXNonUnicode
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXNonUniIta.ttf)
with score of 0.00
findfont: Matching
:family=STIXNonUnicode:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXNonUnicode
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXNonUni.ttf)
with score of 0.00
findfont: Matching
:family=cmb10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to cmb10
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmb10.ttf)
with score of 0.00
findfont: Matching
:family=cmtt10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to cmtt10
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmtt10.ttf)
with score of 0.00
findfont: Matching
:family=cmmi10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to cmmi10
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmmi10.ttf)
with score of 0.00
findfont: Matching
:family=cmex10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to cmex10
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmex10.ttf)
with score of 0.00
findfont: Matching
:family=cmsy10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to cmsy10
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmsy10.ttf)
with score of 0.00
findfont: Matching
:family=cmr10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to cmr10
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmr10.ttf)
with score of 0.00
findfont: Matching
:family=cmss10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to cmss10
(/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmss10.ttf)
with score of 0.00

with the same line but this time setting the font to 'Helvetica', I get:

matplotlib version 0.98.5.2
Using fontManager instance from /Users/perf/.matplotlib/fontList.cache
backend pdf version unknown
findfont: Could not match
:family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium.
Returning

[Matplotlib-users] Patch3DCollection.set_data?

2009-06-29 Thread Ryan Wagner
Can anyone help me out? I'm trying to do the following equivalent in a 
scatter3d call...

line, = ax.plot(data1, data2)
line.set_data(data3, data4)
line.axes.figure.canvas.draw()

So I'm looking to do:

ax = axes3d.Axes3D(fig)
s = ax.scatter(data1, data2, data3)
s.set_data(data2,data3,data4)   -- but this function doesn't exist... what is 
the equivalent that I'm missing?
s.axes.figure.canvas.draw()


TIA
-Ryan

--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] setting figure font to helvetica

2009-06-29 Thread per freem
more information on this. if i try to use pdf.use14corefonts, like was
suggested by Jouni, as follows:

from scipy import *
import matplotlib
matplotlib.use('PDF')
from matplotlib import rc
import matplotlib.pyplot as plt
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
rc('pdf', use14corefonts=True)

then when i open the generated pdf in adobe illustrator i get the error:
The font Helvetica-Narrow contains a bad /BBox.  -- then no labels are
shown in the graph, only the nontextual elements.



On Mon, Jun 29, 2009 at 4:46 PM, per freem perfr...@gmail.com wrote:

 hi all,

 I am not sure if I have helvetica installed as a TTF -- how can i install
 it if i don't?

 i followed the debug suggestion and here are the results. when i set the
 font to arial, using:

 from matplotlib import rc
 rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})

 then the relevant output i get using --verbose-debug is:

 matplotlib version 0.98.5.2
 Using fontManager instance from /Users/perf/.matplotlib/fontList.cache
 backend pdf version unknown
 findfont: Matching
 :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium
 to Arial (/Library/Fonts/Arial.ttf) with score of 0.00
 findfont: Matching
 :family=STIXGeneral:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to STIXGeneral
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXGeneral.ttf)
 with score of 0.00
 findfont: Matching
 :family=STIXNonUnicode:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0
 to STIXNonUnicode
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXNonUniBol.ttf)
 with score of 0.00
 findfont: Matching
 :family=STIXGeneral:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0
 to STIXGeneral
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXGeneralBol.ttf)
 with score of 0.00
 findfont: Matching
 :family=STIXSize3:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to STIXSize3
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXSiz3Sym.ttf)
 with score of 0.00
 findfont: Matching
 :family=STIXSize4:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to STIXSize4
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXSiz4Sym.ttf)
 with score of 0.00
 findfont: Matching
 :family=STIXSize5:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to STIXSize5
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXSiz5Sym.ttf)
 with score of 0.00
 findfont: Matching
 :family=STIXSize1:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to STIXSize1
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXSiz1Sym.ttf)
 with score of 0.00
 findfont: Matching
 :family=STIXSize2:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to STIXSize2
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXSiz2Sym.ttf)
 with score of 0.00
 findfont: Matching
 :family=STIXGeneral:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0
 to STIXGeneral
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXGeneralItalic.ttf)
 with score of 0.00
 findfont: Matching
 :family=STIXNonUnicode:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0
 to STIXNonUnicode
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXNonUniIta.ttf)
 with score of 0.00
 findfont: Matching
 :family=STIXNonUnicode:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to STIXNonUnicode
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/STIXNonUni.ttf)
 with score of 0.00
 findfont: Matching
 :family=cmb10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to cmb10
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmb10.ttf)
 with score of 0.00
 findfont: Matching
 :family=cmtt10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to cmtt10
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmtt10.ttf)
 with score of 0.00
 findfont: Matching
 :family=cmmi10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to cmmi10
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmmi10.ttf)
 with score of 0.00
 findfont: Matching
 :family=cmex10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to cmex10
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmex10.ttf)
 with score of 0.00
 findfont: Matching
 :family=cmsy10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to cmsy10
 (/Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmsy10.ttf)
 with score of 0.00
 findfont: Matching
 :family=cmr10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to cmr10
 

[Matplotlib-users] Detecting whether a click occurs on a text object

2009-06-29 Thread Abiel Reinhart
I am developing an application in which I would like the user to be
able to click on a chart and have the application detect whether the
click has occurred over a specific piece of text. For example, I have
multiple lines on a chart with two y-axes, and I have the titles of
the series stacked up at the top of the chart. I would like the user
to be able to click one of the titles which would then cause the
corresponding series to switch to the other axis. Unfortunately I
still cannot figure how to retrieve the area that a piece of text
fills on the chart.

(in case it makes a difference, note that the chart can be resized at
any time, so the pixel coordinates of the text could change at any
time).

Thanks very much

Abiel

--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users