SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(33)
Dec
(20)
2004 Jan
(7)
Feb
(44)
Mar
(51)
Apr
(43)
May
(43)
Jun
(36)
Jul
(61)
Aug
(44)
Sep
(25)
Oct
(82)
Nov
(97)
Dec
(47)
2005 Jan
(77)
Feb
(143)
Mar
(42)
Apr
(31)
May
(93)
Jun
(93)
Jul
(35)
Aug
(78)
Sep
(56)
Oct
(44)
Nov
(72)
Dec
(75)
2006 Jan
(116)
Feb
(99)
Mar
(181)
Apr
(171)
May
(112)
Jun
(86)
Jul
(91)
Aug
(111)
Sep
(77)
Oct
(72)
Nov
(57)
Dec
(51)
2007 Jan
(64)
Feb
(116)
Mar
(70)
Apr
(74)
May
(53)
Jun
(40)
Jul
(519)
Aug
(151)
Sep
(132)
Oct
(74)
Nov
(282)
Dec
(190)
2008 Jan
(141)
Feb
(67)
Mar
(69)
Apr
(96)
May
(227)
Jun
(404)
Jul
(399)
Aug
(96)
Sep
(120)
Oct
(205)
Nov
(126)
Dec
(261)
2009 Jan
(136)
Feb
(136)
Mar
(119)
Apr
(124)
May
(155)
Jun
(98)
Jul
(136)
Aug
(292)
Sep
(174)
Oct
(126)
Nov
(126)
Dec
(79)
2010 Jan
(109)
Feb
(83)
Mar
(139)
Apr
(91)
May
(79)
Jun
(164)
Jul
(184)
Aug
(146)
Sep
(163)
Oct
(128)
Nov
(70)
Dec
(73)
2011 Jan
(235)
Feb
(165)
Mar
(147)
Apr
(86)
May
(74)
Jun
(118)
Jul
(65)
Aug
(75)
Sep
(162)
Oct
(94)
Nov
(48)
Dec
(44)
2012 Jan
(49)
Feb
(40)
Mar
(88)
Apr
(35)
May
(52)
Jun
(69)
Jul
(90)
Aug
(123)
Sep
(112)
Oct
(120)
Nov
(105)
Dec
(116)
2013 Jan
(76)
Feb
(26)
Mar
(78)
Apr
(43)
May
(61)
Jun
(53)
Jul
(147)
Aug
(85)
Sep
(83)
Oct
(122)
Nov
(18)
Dec
(27)
2014 Jan
(58)
Feb
(25)
Mar
(49)
Apr
(17)
May
(29)
Jun
(39)
Jul
(53)
Aug
(52)
Sep
(35)
Oct
(47)
Nov
(110)
Dec
(27)
2015 Jan
(50)
Feb
(93)
Mar
(96)
Apr
(30)
May
(55)
Jun
(83)
Jul
(44)
Aug
(8)
Sep
(5)
Oct
Nov
(1)
Dec
(1)
2016 Jan
Feb
Mar
(1)
Apr
May
Jun
(2)
Jul
Aug
(3)
Sep
(1)
Oct
(3)
Nov
Dec
2017 Jan
Feb
(5)
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
(7)
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S
1
(1)
2
(15)
3
(3)
4
(6)
5
(4)
6
(7)
7
(2)
8
(5)
9
(9)
10
(8)
11
(3)
12
(5)
13
(5)
14
15
(2)
16
(16)
17
(1)
18
(6)
19
(7)
20
21
(3)
22
23
(4)
24
(14)
25
(5)
26
(1)
27
28
(4)

Showing 8 results of 8

From: Jouni K. S. <jk...@ik...> - 2009年02月10日 22:45:14
Nicolas Grilly <nic...@ga...> writes:
> The PDF backend breaks when the setting pdf.use14corefonts=True is
> used. You'll find a test case reproducing this bug in the attached
> file 'test_pdf_use14corefonts.py'.
You're right. I committed your patch, but there is another bug that
makes this a little difficult to test: the font cache doesn't record
whether it was build with pdf.use14corefonts enabled or not, and the
font name "Helvetica" happens to match "Helvetica Narrow", whose metrics
are included with matplotlib, and using that afm file without including
the font itself breaks the output. I'm too busy with other things to fix
this now, but patches are welcome. As a workaround, deleting
~/.matplotlib/fontList.cache helps if anyone wants to alternate between
enabling and disabling use14corefonts.
> This setting is very useful because it produces very lightweight PDF
> files. The files are lightweight because they only use the 14 core
> fonts built in every PDF viewers (like Helvetica and Times).
Unfortunately, this functionality is deprecated in the PDF standard as
of PDF 1.5, and many publishers require embedding all fonts in PDF
files. Apparently not all substitutes for the standard fonts are similar
enough. (The real fonts need to be licensed, so many Linux distributions
ship with free look-alike substitutes, and who knows what fonts are
installed on some publisher's systems.)
Thanks for the patch!
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
The PDF backend breaks when the setting pdf.use14corefonts=True is
used. You'll find a test case reproducing this bug in the attached
file 'test_pdf_use14corefonts.py'.
This setting is very useful because it produces very lightweight PDF
files. The files are lightweight because they only use the 14 core
fonts built in every PDF viewers (like Helvetica and Times).
Attached to this email is a patch against the current trunk containing
the bug fix and the related test case. Do you agree to commit it?
Thanks,
Nicolas Grilly
From: Brian G. <ell...@gm...> - 2009年02月10日 20:05:22
Michiel,
Thanks for jumping into the discussion.
> I wrote the code in PyGTK that uses PyOS_InputHook for interactivity, as well as the Mac OS X native backend for matplotlib that uses PyOS_InputHook in exactly the same way. PyQT and Tkinter also use PyOS_InputHook, though the code is a bit kludgy on Windows. So I definitely agree that PyOS_InputHook is the right way to go.
Great, I was wondering how the Mac OS X backend works - now I know. I
will have a look at the code for both PyGTK and OS X. Hopefully that
will show me more of the best way of handling this.
> Your current code should work, but there's a better way to do it. If I understand the code correctly, you rely on the fact that PyOS_InputHook is called repeatedly by readline, and you use PyOS_InputHook to process wx events that need to be processed at that time.
Yes, at least that is my understanding. I put in some debug
statements and you could see that it was being called repeatedly.
A better way is to use PyOS_InputHook to start the wx event loop, but
have this event loop check stdin. As soon as some input is available
on stdin, you exit the event loop, which means that PyOS_InputHook
returns, and Python can proceed to handle the command that was just
entered by the user on stdin.
>
> Essentially, think of wx's event loop as sitting in a call to select(), waiting for the next wx event to arrive. You want to add fileno(stdin) to the set of file descriptors watched by select().
I have seen that this is how the PyQt4 implementation handles it.
> There are two advantages to this approach. First, it does not rely on readline calling PyOS_InputHook repeatedly. This is important, since Python may not be using readline at all, and if it is, depending on the Python version and how readline was installed it may call PyOS_InputHook only once.
OK, I was wondering about this. But, what happens if PyOS_InputHook
is called repeatedly. Are you not then starting the event loop
multiple times. Can you say more about what happens in this case?
Second, this approach is more efficient (not wasting processor cycles
going back and forth between readline and PyOS_InputHook), and gives a
better response time (essentially immediate).
That would be very nice as my implementation is less responsive.
> The best place to put this code is in wxPython. Hopefully (I haven't checked this), wx exposes enough of the event loop to allow you to have it watch stdin. This may be an issue, since for example qt4 does not on Windows, which is why the event loop is kludgy with PyQT on Windows. You could have a look at the PyOS_InputHook code in PyGTK (you'll need to get the developer's version of PyGTK, since this code is not yet in an official release). It's actually quite straightforward and you may be able to modify it directly for wx.
Yes, I fully agree with this. I might end up contacting the wx devs
to get their help on this. I actually don't know wx at all, so I am
amazed that I got this far. I will have a look at the PyGTK
implementation.
> It's actually unfortunate that we have to use PyOS_InputHook; all this would be a lot easier if Python itself supported event loops.
Yes, that would be nice!!!
Cheers,
Brian
> --Michiel
>
> --- On Sun, 2/8/09, Brian Granger <ell...@gm...> wrote:
>
>> From: Brian Granger <ell...@gm...>
>> Subject: [matplotlib-devel] Interactive wx/pylab with no threads (PyOS_InputHook)
>> To: mat...@li..., "IPython Development list" <ipy...@sc...>
>> Date: Sunday, February 8, 2009, 7:08 PM
>> IPython and matplotlib devs,
>>
>> Over the weekend I have been playing around to see if it is
>> possible
>> to do interactive GUI work with wx from IPython *without
>> using
>> threads*. The idea here is to use PyOS_InputHook.
>> Currently, recent
>> versions of PyQt4 and PyGTK do this and if we can get wx
>> working, we
>> can probably get rid of IPython's subtle threaded
>> shells that
>> currently allow interactive GUIs to work.
>>
>> I am attaching a Cython module that mostly works. Here is
>> a simple
>> example that works in IPython (without the -wthread
>> option!)
>>
>> In [1]: import pyximport
>>
>> In [2]: pyximport.install()
>>
>> In [3]: import inputhook
>>
>> In [4]: inputhook.set_input_hook()
>>
>> In [5]: import wx
>>
>> In [6]: app = wx.PySimpleApp()
>>
>> In [7]: app.MainLoop()
>>
>> In [8]: f = wx.Frame(None,-1,"Look mom, no
>> threads!")
>>
>> In [9]: f.Show()
>> Out[9]: True
>>
>> The docstring of the module also has a matplotlib example.
>> This
>> really does work and I am pretty sure it will also work in
>> plain
>> vanilla python as well. There are a few issues to work
>> out:
>>
>> * When frame are closed by clicking the red button or the
>> "X", the
>> Windows don't close. In addition, in matplotlib, this
>> causes further
>> problems.
>>
>> * In the current matplotlib backend wx.Yield() is called in
>> a way that
>> is not safe as far as protecting against recursive calls to
>> Yield. I
>> think it should be called in this way:
>>
>> app = wx.GetApp()
>> if app is not None:
>> app.Yield(True)
>>
>> * I don't think that interupts work yet, but I
>> haven't tested this
>> thoroughly yet.
>>
>> I don't have any more time to work on this right now,
>> but I at least
>> wanted to share my findings with both IPython and
>> matplotlib devs. It
>> would be great if someone familiar with wx could try to
>> figure out the
>> remaining issues. If there are no takers here, I might
>> eventually see
>> if wxpython itself is interested in this code (that is
>> probably where
>> it really belongs anyway).
>>
>> Cheers,
>>
>> Brian
>> ------------------------------------------------------------------------------
>> Create and Deploy Rich Internet Apps outside the browser
>> with Adobe(R)AIR(TM)
>> software. With Adobe AIR, Ajax developers can use existing
>> skills and code to
>> build responsive, highly engaging applications that combine
>> the power of local
>> resources and data with the reach of the web. Download the
>> Adobe AIR SDK and
>> Ajax docs to start building applications
>> today-http://p.sf.net/sfu/adobe-com_______________________________________________
>> Matplotlib-devel mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
>
>
From: Adam M. <ram...@gm...> - 2009年02月10日 16:54:44
On Mon, Feb 9, 2009 at 17:08, Jayson Barr <jb...@nm...> wrote:
> I agree with JDH.
Likewise.
> Unfortunately, work has been exceptionally hectic so I haven't begun
> the patch (if you don't count the hack job I did to install it for
> myself).
Same here, I'm really busy with work and don't have much time to look
into this at the moment.
> Hi Adam,
> As noted above, I haven't started a patch yet but I would be up for
> working with you on one. It sounds like we can get this tested pretty
> well.
Its on my todo list, so when I get chance I'm going to investigate a
better solution. I'll keep you posted.
Cheers
Adam
From: Zunbeltz I. <zun...@he...> - 2009年02月10日 16:11:09
Dear all,
I asked in the user list for a way to have only left and bottom border
in figure frame
(http://sourceforge.net/mailarchive/forum.php?thread_name=1233927942.20817.1.camel%40mineat2.hmi.de&forum_name=matplotlib-users)
Tony S Yu has kindly give a solution and a implementation that maybe it
will be nice to integrate the trunk. I think this is a very nice
feature. Also, it would be good it this could be configured from de
rcParam.
Regards,
Zunbeltz
-- 
Dr. Zunbeltz Izaola
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Methods and Instruments (SF1)
Glienicker Str. 100
D-14109 Berlin
Tel (030) 8062-3179 
Fax (030) 8062-2523 
Room A 349 
From: Michiel de H. <mjl...@ya...> - 2009年02月10日 12:52:30
Hi Brian,
I wrote the code in PyGTK that uses PyOS_InputHook for interactivity, as well as the Mac OS X native backend for matplotlib that uses PyOS_InputHook in exactly the same way. PyQT and Tkinter also use PyOS_InputHook, though the code is a bit kludgy on Windows. So I definitely agree that PyOS_InputHook is the right way to go.
Your current code should work, but there's a better way to do it. If I understand the code correctly, you rely on the fact that PyOS_InputHook is called repeatedly by readline, and you use PyOS_InputHook to process wx events that need to be processed at that time. A better way is to use PyOS_InputHook to start the wx event loop, but have this event loop check stdin. As soon as some input is available on stdin, you exit the event loop, which means that PyOS_InputHook returns, and Python can proceed to handle the command that was just entered by the user on stdin.
Essentially, think of wx's event loop as sitting in a call to select(), waiting for the next wx event to arrive. You want to add fileno(stdin) to the set of file descriptors watched by select().
There are two advantages to this approach. First, it does not rely on readline calling PyOS_InputHook repeatedly. This is important, since Python may not be using readline at all, and if it is, depending on the Python version and how readline was installed it may call PyOS_InputHook only once. Second, this approach is more efficient (not wasting processor cycles going back and forth between readline and PyOS_InputHook), and gives a better response time (essentially immediate).
The best place to put this code is in wxPython. Hopefully (I haven't checked this), wx exposes enough of the event loop to allow you to have it watch stdin. This may be an issue, since for example qt4 does not on Windows, which is why the event loop is kludgy with PyQT on Windows. You could have a look at the PyOS_InputHook code in PyGTK (you'll need to get the developer's version of PyGTK, since this code is not yet in an official release). It's actually quite straightforward and you may be able to modify it directly for wx.
It's actually unfortunate that we have to use PyOS_InputHook; all this would be a lot easier if Python itself supported event loops.
--Michiel
--- On Sun, 2/8/09, Brian Granger <ell...@gm...> wrote:
> From: Brian Granger <ell...@gm...>
> Subject: [matplotlib-devel] Interactive wx/pylab with no threads (PyOS_InputHook)
> To: mat...@li..., "IPython Development list" <ipy...@sc...>
> Date: Sunday, February 8, 2009, 7:08 PM
> IPython and matplotlib devs,
> 
> Over the weekend I have been playing around to see if it is
> possible
> to do interactive GUI work with wx from IPython *without
> using
> threads*. The idea here is to use PyOS_InputHook. 
> Currently, recent
> versions of PyQt4 and PyGTK do this and if we can get wx
> working, we
> can probably get rid of IPython's subtle threaded
> shells that
> currently allow interactive GUIs to work.
> 
> I am attaching a Cython module that mostly works. Here is
> a simple
> example that works in IPython (without the -wthread
> option!)
> 
> In [1]: import pyximport
> 
> In [2]: pyximport.install()
> 
> In [3]: import inputhook
> 
> In [4]: inputhook.set_input_hook()
> 
> In [5]: import wx
> 
> In [6]: app = wx.PySimpleApp()
> 
> In [7]: app.MainLoop()
> 
> In [8]: f = wx.Frame(None,-1,"Look mom, no
> threads!")
> 
> In [9]: f.Show()
> Out[9]: True
> 
> The docstring of the module also has a matplotlib example. 
> This
> really does work and I am pretty sure it will also work in
> plain
> vanilla python as well. There are a few issues to work
> out:
> 
> * When frame are closed by clicking the red button or the
> "X", the
> Windows don't close. In addition, in matplotlib, this
> causes further
> problems.
> 
> * In the current matplotlib backend wx.Yield() is called in
> a way that
> is not safe as far as protecting against recursive calls to
> Yield. I
> think it should be called in this way:
> 
> app = wx.GetApp()
> if app is not None:
> app.Yield(True)
> 
> * I don't think that interupts work yet, but I
> haven't tested this
> thoroughly yet.
> 
> I don't have any more time to work on this right now,
> but I at least
> wanted to share my findings with both IPython and
> matplotlib devs. It
> would be great if someone familiar with wx could try to
> figure out the
> remaining issues. If there are no takers here, I might
> eventually see
> if wxpython itself is interested in this code (that is
> probably where
> it really belongs anyway).
> 
> Cheers,
> 
> Brian
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser
> with Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing
> skills and code to
> build responsive, highly engaging applications that combine
> the power of local
> resources and data with the reach of the web. Download the
> Adobe AIR SDK and
> Ajax docs to start building applications
> today-http://p.sf.net/sfu/adobe-com_______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
 
From: Andrew S. <str...@as...> - 2009年02月10日 04:44:31
Gary Ruben wrote:
> Hi Andrew,
> 
> I don't have commit access. If you would check it in, that would be great.
Committed to the trunk in r6899... Thanks!
And, sheesh, SourceForge's SVN server is slooow today for me, although
it seems to have finally improved.
From: Ryan M. <rm...@gm...> - 2009年02月10日 04:37:49
Hi,
What's the official status of the plain Wx backend (not WxAgg) ? I'm
noticing that the following script produces black outlines with Wx, but
should not (and does not on other backends). I also noticed font
differences between the two. I was curious if this is something to track
down or if plain Wx is just kind of abandoned. I've also attached images
made with Wx and GtkAgg.
#!/usr/bin/env python
import matplotlib.mlab as mlab
from pylab import figure, show
import numpy as np
x = np.arange(0.0, 2, 0.01)
y1 = np.sin(2*np.pi*x)
y2 = 1.2*np.sin(4*np.pi*x)
# now fill between y1 and y2 where a logical condition is met. Note
# this is different than calling
# fill_between(x[where], y1[where],y2[where]
# because of edge effects over multiple contiguous regions.
fig = figure()
ax = fig.add_subplot(111)
#ax.plot(x, y1, x, y2, color='black')
ax.fill_between(x, y1, y2, where=y2>y1, facecolor='#8388FC',
edgecolor='None')
ax.fill_between(x, y1, y2, where=y2<=y1, facecolor='#C14F53',
edgecolor='None')
ax.set_title('fill between where')
show()
Thoughts?
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

Showing 8 results of 8

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /