[Matplotlib-users] legend markerscale not working

2008-11-10 Thread Orest Kozyar
On Ubuntu 8.10 (Intrepid Ibex) I'm using matplotlib 0.98.3 and would
like to use the markerscale to make my legend points smaller (e.g.
0.6).  However, it does not appear to be working.  The following code:

plot(arange(0, 100, .1), cos(arange(0, 100, .1)), 'ro', markersize=20,
lable='test')
legend(markerscale=0.5)

draws a legend that has markers the same size as the original plot.  I
saw someone posted on September 24, and had a response from someone.
For some reason, the response was blank (at least as it appears in the
list archives), so I thought I'd send another message to see if anyone
had figured out what needs to be done to get markerscale working?

Thanks
Orest

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] inconsistency with minor ticks when configuring ticks from scratch

2008-07-31 Thread Orest Kozyar
The following illustrates a slight inconsistency in matplotlib:

a = subplot(111)
a.yaxis.tick_left()
yscale('log')
show()

Since the default linear minor locator is NullLocator, there are no
minor ticks to use as a template when the default logarithmic minor
locator is used.  This results in the minor ticks being drawn on the
right as well as left axes.  It seems more logical to add a flag
somewhere indicating that tick_left was specified, and check this flag
when configuring ticks from scratch.  Likewise for the xaxis.

Orest

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] AssertionError in symlog_demo.py

2008-07-01 Thread Orest Kozyar
When I try to run symlog_demo.py in version 98.1, I get the following
AssertionError.  Should __call__ of the SymmetricalLogLocator be
calling transform on vmin and vmax separately?  Any advice?

Thanks,
Orest

$ python symlog_demo.py
c:\programs\Python25\lib\site-packages\pytz-2007k-py2.5.egg\pytz\__init__.py:29:
 UserWarning: Module dateutil was already imported from c:\programs\Python25\lib
\site-packages\python_dateutil-1.3-py2.5.egg\dateutil\__init__.pyc, but c:\progr
ams\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg is being added
to sys.path
c:\programs\Python25\lib\site-packages\pytz-2007k-py2.5.egg\pytz\__init__.py:29:
 UserWarning: Module pytz was already imported from c:\programs\Python25\lib\sit
e-packages\pytz-2007k-py2.5.egg\pytz\__init__.py, but c:\programs\python25\lib\s
ite-packages\matplotlib-0.98.1-py2.5-win32.egg is being added to sys.path
Traceback (most recent call last):
  File symlog_demo.py, line 28, in module
savefig('symlog_demo')
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\pyplot.py, line 286, in savefig
return fig.savefig(*args, **kwargs)
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\figure.py, line 1014, in savefig
self.canvas.print_figure(*args, **kwargs)
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\backend_bases.py, line 1287, in print_figure
**kwargs)
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\backends\backend_agg.py, line 300, in print_png
FigureCanvasAgg.draw(self)
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\backends\backend_agg.py, line 256, in draw
self.figure.draw(self.renderer)
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\figure.py, line 832, in draw
for a in self.axes: a.draw(renderer)
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\axes.py, line 1482, in draw
a.draw(renderer)
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\axis.py, line 712, in draw
for tick, loc, label in self.iter_ticks():
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\axis.py, line 654, in iter_ticks
majorLocs = self.major.locator()
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\ticker.py, line 1080, in __call__
vmin, vmax = self._transform.transform_point((vmin, vmax))
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\transforms.py, line 1072, in transform_point
assert len(point) == self.input_dims
AssertionError

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Error with 'symlog' when vmin=0

2008-07-01 Thread Orest Kozyar
The following code fails with a math range error:

from pylab import *
plot(arange(5), 'ro')
xscale('symlog')

The traceback indicates that the ticker is attempting to treat vmin
(which falls inside the linear portion of the SymLog scale) as a log
value, which obviously fails when vmin=0.  If vmin is less than zero,
then everything works fine.  For example the following works.

from pylab import *
plot(arange(-1,5) ,'ro')
xscale('symlog')

Traceback for the first example is as follows:
Traceback (most recent call last):
  File stdin, line 1, in module
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\pyplot.py, line 824, in xscale
ret = ax.set_xscale(*args, **kwargs)
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\axes.py, line 1773, in set_xscale
self.autoscale_view()
  File c:\progra~1\python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\axes.py, line 1400, in autoscale_view
XL = self.xaxis.get_major_locator().autoscale()
  File c:\programs\Python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\ticker.py, line 1114, in autoscale
if not is_decade(abs(vmin), b):
  File c:\programs\Python25\lib\site-packages\matplotlib-0.98.1-py2.5-win32.egg
\matplotlib\ticker.py, line 960, in is_decade
lx = math.log(x)/math.log(base)
OverflowError: math range error

Orest

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Rendering of fonts in plots does not honor user-specified parameters

2007-12-16 Thread Orest Kozyar
 Not sure if this is your issue but I had problems with fonts until I
 uncommented the RC file in the fonts section of it.  Matplotlib ships with
 the RC commented out.  The file matplotlibrc is found in the
 matplotlib\mpl-data folder.  You can just edit it with Notepad and uncomment
 the lines regarding fonts and try it again.

That worked perfectly.  Thanks!

-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Capturing keydown events

2007-09-19 Thread Orest Kozyar
I'm embedding a FigureCanvasWxAgg into a wx.Panel and binding key events to
it:

class MyPanel(wx.Panel)

def __init__(self, parent, file, id=-1):
wx.Panel.__init__(self, parent,
style=wx.WANTS_CHARS | wx.NO_FULL_REPAINT_ON_RESIZE)

#Set up the canvas
self.figure = Figure((9,8),75)
self.canvas = FigureCanvasWxAgg(self, -1, self.figure)
self.subplot = self.figure.add_subplot(111)

#Set up the toolbar
self.toolbar = NavigationToolbar2Wx(self.canvas)
tw, th = self.toolbar.GetSizeTuple()
fw, fh = self.canvas.GetSizeTuple()
self.toolbar.SetSize(wx.Size(fw, th))

#Set up figure manager
self.figmgr = FigureManager(self.canvas, 1, self)

self.canvas.Bind(wx.EVT_KEY_UP, self.__keyup)
self.canvas.Bind(wx.EVT_KEY_DOWN, self.__keydown)

def self.__keyup(self, evt):
print 'key up'

def self.__keydown(self, evt):
print 'key down'

The program successfully detects keydown events for just about every key
with three major exceptions: wx.WXK_RETURN, wx.WXK_RIGHT, wx.WXK_LEFT.
There may be other keys out there, but those three keys are the ones I need
to process events for.  

I've tried subclassing FigureCanvasWxAgg and defining key_press_event (which
doesn't seem to work) and overriding _onKeyDown (which still does not
capture the keys I need).  Something weird seems to be happening to these
keys, and was wondering if anyone could help me?

I am able to detect the EVT_KEY_UP for these three keys.  Just not the key
down ones.  

Thanks!
Orest


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users