[matplotlib-devel] xkcd doesn't seem to work in MacOSX backend

2014-11-18 Thread Mark Bakker
Hello list,

I don't seem to get xkcd to work in the MacOSX backend. When I try to make
a plot I get a nice white figure with nothing on it. Here's what I did:

import matplotlib.pyplot as plt
%matplotlib # responds with Using matplotlib backend: MacOSX
plt.plot([1,2,3])  # gives white figure with nothing on it

When I do a kernel restart and specify the qt backend it works fine (so I
have a workaround), but I presume it should work, right?

Thanks,

Mark
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] xkcd doesn't seem to work in MacOSX backend

2014-11-18 Thread Benjamin Root
Which version of matplotlib are you using?

On Tue, Nov 18, 2014 at 10:55 AM, Mark Bakker  wrote:

> Hello list,
>
> I don't seem to get xkcd to work in the MacOSX backend. When I try to make
> a plot I get a nice white figure with nothing on it. Here's what I did:
>
> import matplotlib.pyplot as plt
> %matplotlib # responds with Using matplotlib backend: MacOSX
> plt.plot([1,2,3])  # gives white figure with nothing on it
>
> When I do a kernel restart and specify the qt backend it works fine (so I
> have a workaround), but I presume it should work, right?
>
> Thanks,
>
> Mark
>
>
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] xkcd doesn't seem to work in MacOSX backend

2014-11-18 Thread Mark Bakker
Sorry, forgot to mention that: 1.4.0

On Tue, Nov 18, 2014 at 5:00 PM, Benjamin Root  wrote:

> Which version of matplotlib are you using?
>
> On Tue, Nov 18, 2014 at 10:55 AM, Mark Bakker  wrote:
>
>> Hello list,
>>
>> I don't seem to get xkcd to work in the MacOSX backend. When I try to
>> make a plot I get a nice white figure with nothing on it. Here's what I did:
>>
>> import matplotlib.pyplot as plt
>> %matplotlib # responds with Using matplotlib backend: MacOSX
>> plt.plot([1,2,3])  # gives white figure with nothing on it
>>
>> When I do a kernel restart and specify the qt backend it works fine (so I
>> have a workaround), but I presume it should work, right?
>>
>> Thanks,
>>
>> Mark
>>
>>
>>
>> --
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
>> ___
>> Matplotlib-devel mailing list
>> Matplotlib-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>
>>
>
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] xkcd doesn't seem to work in MacOSX backend

2014-11-18 Thread Jens Nielsen
I can reproduce it with the following traceback. Can you please open a bug
report on Github for this issue?

```
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py", line
59, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/matplotlib/figure.py", line
1079, in draw
func(*args)
  File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py", line
59, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/matplotlib/axes/_base.py",
line 2092, in draw
a.draw(renderer)
  File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py", line
59, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/matplotlib/lines.py", line
712, in draw
drawFunc(renderer, gc, tpath, affine.frozen())
  File "/usr/local/lib/python2.7/site-packages/matplotlib/lines.py", line
1067, in _draw_lines
self._lineFunc(renderer, gc, path, trans)
  File "/usr/local/lib/python2.7/site-packages/matplotlib/lines.py", line
1107, in _draw_solid
renderer.draw_path(gc, path, trans)
  File "/usr/local/lib/python2.7/site-packages/matplotlib/patheffects.py",
line 115, in draw_path
rgbFace)
  File "/usr/local/lib/python2.7/site-packages/matplotlib/patheffects.py",
line 217, in draw_path
renderer.draw_path(gc, tpath, affine, rgbFace)
  File
"/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py",
line 58, in draw_path
gc.draw_path(path, transform, linewidth, rgbFace)
AttributeError: GraphicsContextBase instance has no attribute 'draw_path'
```

best
Jens

On Tue, Nov 18, 2014 at 4:12 PM, Mark Bakker  wrote:

> Sorry, forgot to mention that: 1.4.0
>
> On Tue, Nov 18, 2014 at 5:00 PM, Benjamin Root  wrote:
>
>> Which version of matplotlib are you using?
>>
>> On Tue, Nov 18, 2014 at 10:55 AM, Mark Bakker  wrote:
>>
>>> Hello list,
>>>
>>> I don't seem to get xkcd to work in the MacOSX backend. When I try to
>>> make a plot I get a nice white figure with nothing on it. Here's what I did:
>>>
>>> import matplotlib.pyplot as plt
>>> %matplotlib # responds with Using matplotlib backend: MacOSX
>>> plt.plot([1,2,3])  # gives white figure with nothing on it
>>>
>>> When I do a kernel restart and specify the qt backend it works fine (so
>>> I have a workaround), but I presume it should work, right?
>>>
>>> Thanks,
>>>
>>> Mark
>>>
>>>
>>>
>>> --
>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>>> Get technology previously reserved for billion-dollar corporations, FREE
>>>
>>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
>>> ___
>>> Matplotlib-devel mailing list
>>> Matplotlib-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>>
>>>
>>
>
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] tk backend broken (somehow?)

2014-11-18 Thread Benjamin Root
Indeed, there are some oddities, but mostly with regards to Qt and forcing
it to build and link against (presumedly) the conda package of it. There is
a modification of the setupext.py that happens at build time to replace all
instances of "/usr/local" with "$PREFIX". Perhaps what is happening is that
my local builds of matplotlib is compiling and linking against my system
install of the tk/tcl headers and libraries, and that might be conflicting
with the conda-shipped tk/tcl packages?

I'll have to experiment a bit more tonight. Thanks for the suggestion!

Ben Root

On Mon, Nov 17, 2014 at 11:07 PM, Thomas Caswell  wrote:

> Have a look at the recipe in conda-rescipes for matplotlib, they might be
> doing some funny patching.
>
> On Mon, Nov 17, 2014, 22:48 Benjamin Root  wrote:
>
>> Ok, I am just really confused now. I have confirmed that using the
>> matplotlib supplied by miniconda (v1.4.2) works just fine. Ripping that out
>> and building version 1.4.2 from source results in the traceback. Same thing
>> for v1.3.1. I have even tried checking out PR#3811 which addresses the
>> weird constructor issues we found today, and I still get the segfault.
>>
>> Maybe I should try getting out of the conda environment entirely and try
>> EPD instead to see if that makes a difference?
>>
>> Ben Root
>>
>> On Mon, Nov 17, 2014 at 5:17 AM, Phil Elson  wrote:
>>
>>> Mike made some changes to this recently.
>>> https://github.com/matplotlib/matplotlib/pull/3778
>>>
>>> May be the cause.
>>>
>>> On 16 November 2014 18:12, Benjamin Root  wrote:
>>>
 And with my continuing saga of backend-specific things...

 I was using conda, but because it does not ship with pygtk support, I
 had to manually install pygtk into the conda environment and then install
 matplotlib from source. All that seemed to work fine when I worked on Wx
 and Gtk examples for my book.

 I went back to a (previously working) Tk example to polish it, and I
 get all sorts of errors now. I have tried multiple releases of matplotlib
 from source (doing a git clean -fxd between them), all with similar errors.
 In fact, with master, the error causes a segfault:

 ben@tigger:~/Documents/InteractiveMPL$ python chp5/slider_tk.py
 Exception in Tkinter callback
 Traceback (most recent call last):
   File "/home/ben/miniconda/lib/python2.7/lib-tk/Tkinter.py", line
 1486, in __call__
 return self.func(*args)
   File
 "/home/ben/miniconda/lib/python2.7/site-packages/matplotlib-1.5.x-py2.7-linux-x86_64.egg/matplotlib/backends/backend_tkagg.py",
 line 278, in resize
 self.show()
   File
 "/home/ben/miniconda/lib/python2.7/site-packages/matplotlib-1.5.x-py2.7-linux-x86_64.egg/matplotlib/backends/backend_tkagg.py",
 line 350, in draw
 tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
   File
 "/home/ben/miniconda/lib/python2.7/site-packages/matplotlib-1.5.x-py2.7-linux-x86_64.egg/matplotlib/backends/tkagg.py",
 line 30, in blit
 id(data), colormode, id(bbox_array))
 TclError
 alloc: invalid block: 0x2cfe3b0: 0 0
 Aborted (core dumped)

 The line in question is (at least in v1.3.1, it is slightly different
 in more recent versions):
 tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode,
 id(bbox_array))

 This happens regardless of what example I use (my own or otherwise).
 There is no blit-specific code in the examples. All of this worked with the
 conda-supplied matplotlib, but never the
 from-source-into-a-conda-environment install.

 Thoughts?
 Ben Root


 --
 Comprehensive Server Monitoring with Site24x7.
 Monitor 10 servers for $9/Month.
 Get alerted through email, SMS, voice calls or mobile push
 notifications.
 Take corrective actions from your mobile device.

 http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
 ___
 Matplotlib-devel mailing list
 Matplotlib-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


>>>
>> 
>> --
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&;
>> iu=/4140/ostg.clktrk___
>> Matplotlib-devel mailing list
>> Matplotlib-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>
>

Re: [matplotlib-devel] xkcd doesn't seem to work in MacOSX backend

2014-11-18 Thread Phil Elson
Isn't the XKCD stuff baked into the Agg backend. Is it even possible to
produce XKCD svg or PDFs?

On 18 November 2014 17:01, Jens Nielsen  wrote:

> I can reproduce it with the following traceback. Can you please open a bug
> report on Github for this issue?
>
> ```
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py", line
> 59, in draw_wrapper
> draw(artist, renderer, *args, **kwargs)
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/figure.py", line
> 1079, in draw
> func(*args)
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py", line
> 59, in draw_wrapper
> draw(artist, renderer, *args, **kwargs)
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/axes/_base.py",
> line 2092, in draw
> a.draw(renderer)
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py", line
> 59, in draw_wrapper
> draw(artist, renderer, *args, **kwargs)
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/lines.py", line
> 712, in draw
> drawFunc(renderer, gc, tpath, affine.frozen())
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/lines.py", line
> 1067, in _draw_lines
> self._lineFunc(renderer, gc, path, trans)
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/lines.py", line
> 1107, in _draw_solid
> renderer.draw_path(gc, path, trans)
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/patheffects.py",
> line 115, in draw_path
> rgbFace)
>   File "/usr/local/lib/python2.7/site-packages/matplotlib/patheffects.py",
> line 217, in draw_path
> renderer.draw_path(gc, tpath, affine, rgbFace)
>   File
> "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py",
> line 58, in draw_path
> gc.draw_path(path, transform, linewidth, rgbFace)
> AttributeError: GraphicsContextBase instance has no attribute 'draw_path'
> ```
>
> best
> Jens
>
> On Tue, Nov 18, 2014 at 4:12 PM, Mark Bakker  wrote:
>
>> Sorry, forgot to mention that: 1.4.0
>>
>> On Tue, Nov 18, 2014 at 5:00 PM, Benjamin Root  wrote:
>>
>>> Which version of matplotlib are you using?
>>>
>>> On Tue, Nov 18, 2014 at 10:55 AM, Mark Bakker  wrote:
>>>
 Hello list,

 I don't seem to get xkcd to work in the MacOSX backend. When I try to
 make a plot I get a nice white figure with nothing on it. Here's what I 
 did:

 import matplotlib.pyplot as plt
 %matplotlib # responds with Using matplotlib backend: MacOSX
 plt.plot([1,2,3])  # gives white figure with nothing on it

 When I do a kernel restart and specify the qt backend it works fine (so
 I have a workaround), but I presume it should work, right?

 Thanks,

 Mark



 --
 Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
 from Actuate! Instantly Supercharge Your Business Reports and Dashboards
 with Interactivity, Sharing, Native Excel Exports, App Integration &
 more
 Get technology previously reserved for billion-dollar corporations, FREE

 http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
 ___
 Matplotlib-devel mailing list
 Matplotlib-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


>>>
>>
>>
>> --
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
>> ___
>> Matplotlib-devel mailing list
>> Matplotlib-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>
>>
>
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboard

Re: [matplotlib-devel] xkcd doesn't seem to work in MacOSX backend

2014-11-18 Thread Chris Barker
On Tue, Nov 18, 2014 at 9:55 AM, Phil Elson  wrote:

> Isn't the XKCD stuff baked into the Agg backend. Is it even possible to
> produce XKCD svg or PDFs?
>

I wouldn't be surprised -- that's some pretty fancy stuff!

To the OP -- maybe you can use the cocoaagg back-end...

-CHB





> On 18 November 2014 17:01, Jens Nielsen  wrote:
>
>> I can reproduce it with the following traceback. Can you please open a
>> bug report on Github for this issue?
>>
>> ```
>> Traceback (most recent call last):
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py",
>> line 59, in draw_wrapper
>> draw(artist, renderer, *args, **kwargs)
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/figure.py",
>> line 1079, in draw
>> func(*args)
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py",
>> line 59, in draw_wrapper
>> draw(artist, renderer, *args, **kwargs)
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/axes/_base.py",
>> line 2092, in draw
>> a.draw(renderer)
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py",
>> line 59, in draw_wrapper
>> draw(artist, renderer, *args, **kwargs)
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/lines.py", line
>> 712, in draw
>> drawFunc(renderer, gc, tpath, affine.frozen())
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/lines.py", line
>> 1067, in _draw_lines
>> self._lineFunc(renderer, gc, path, trans)
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/lines.py", line
>> 1107, in _draw_solid
>> renderer.draw_path(gc, path, trans)
>>   File
>> "/usr/local/lib/python2.7/site-packages/matplotlib/patheffects.py", line
>> 115, in draw_path
>> rgbFace)
>>   File
>> "/usr/local/lib/python2.7/site-packages/matplotlib/patheffects.py", line
>> 217, in draw_path
>> renderer.draw_path(gc, tpath, affine, rgbFace)
>>   File
>> "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py",
>> line 58, in draw_path
>> gc.draw_path(path, transform, linewidth, rgbFace)
>> AttributeError: GraphicsContextBase instance has no attribute 'draw_path'
>> ```
>>
>> best
>> Jens
>>
>> On Tue, Nov 18, 2014 at 4:12 PM, Mark Bakker  wrote:
>>
>>> Sorry, forgot to mention that: 1.4.0
>>>
>>> On Tue, Nov 18, 2014 at 5:00 PM, Benjamin Root  wrote:
>>>
 Which version of matplotlib are you using?

 On Tue, Nov 18, 2014 at 10:55 AM, Mark Bakker 
 wrote:

> Hello list,
>
> I don't seem to get xkcd to work in the MacOSX backend. When I try to
> make a plot I get a nice white figure with nothing on it. Here's what I 
> did:
>
> import matplotlib.pyplot as plt
> %matplotlib # responds with Using matplotlib backend: MacOSX
> plt.plot([1,2,3])  # gives white figure with nothing on it
>
> When I do a kernel restart and specify the qt backend it works fine
> (so I have a workaround), but I presume it should work, right?
>
> Thanks,
>
> Mark
>
>
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and
> Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration &
> more
> Get technology previously reserved for billion-dollar corporations,
> FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>

>>>
>>>
>>> --
>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>>> Get technology previously reserved for billion-dollar corporations, FREE
>>>
>>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
>>> ___
>>> Matplotlib-devel mailing list
>>> Matplotlib-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>>
>>>
>>
>>
>> --
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
>> ___
>> Matplotlib-devel mailing lis

Re: [matplotlib-devel] xkcd doesn't seem to work in MacOSX backend

2014-11-18 Thread Mark Bakker
Like I said, it works fine when I select the QT backend. So I have a
workaround.
I was just wondering wether it was supposed to work with the MacOSX backend.
Does anybody know?
If so, I'll file a bug report.
Mark

On Tue, Nov 18, 2014 at 6:55 PM, Phil Elson  wrote:

> Isn't the XKCD stuff baked into the Agg backend. Is it even possible to
> produce XKCD svg or PDFs?
>
> On 18 November 2014 17:01, Jens Nielsen  wrote:
>
>> I can reproduce it with the following traceback. Can you please open a
>> bug report on Github for this issue?
>>
>> ```
>> Traceback (most recent call last):
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py",
>> line 59, in draw_wrapper
>> draw(artist, renderer, *args, **kwargs)
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/figure.py",
>> line 1079, in draw
>> func(*args)
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py",
>> line 59, in draw_wrapper
>> draw(artist, renderer, *args, **kwargs)
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/axes/_base.py",
>> line 2092, in draw
>> a.draw(renderer)
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py",
>> line 59, in draw_wrapper
>> draw(artist, renderer, *args, **kwargs)
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/lines.py", line
>> 712, in draw
>> drawFunc(renderer, gc, tpath, affine.frozen())
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/lines.py", line
>> 1067, in _draw_lines
>> self._lineFunc(renderer, gc, path, trans)
>>   File "/usr/local/lib/python2.7/site-packages/matplotlib/lines.py", line
>> 1107, in _draw_solid
>> renderer.draw_path(gc, path, trans)
>>   File
>> "/usr/local/lib/python2.7/site-packages/matplotlib/patheffects.py", line
>> 115, in draw_path
>> rgbFace)
>>   File
>> "/usr/local/lib/python2.7/site-packages/matplotlib/patheffects.py", line
>> 217, in draw_path
>> renderer.draw_path(gc, tpath, affine, rgbFace)
>>   File
>> "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py",
>> line 58, in draw_path
>> gc.draw_path(path, transform, linewidth, rgbFace)
>> AttributeError: GraphicsContextBase instance has no attribute 'draw_path'
>> ```
>>
>> best
>> Jens
>>
>> On Tue, Nov 18, 2014 at 4:12 PM, Mark Bakker  wrote:
>>
>>> Sorry, forgot to mention that: 1.4.0
>>>
>>> On Tue, Nov 18, 2014 at 5:00 PM, Benjamin Root  wrote:
>>>
 Which version of matplotlib are you using?

 On Tue, Nov 18, 2014 at 10:55 AM, Mark Bakker 
 wrote:

> Hello list,
>
> I don't seem to get xkcd to work in the MacOSX backend. When I try to
> make a plot I get a nice white figure with nothing on it. Here's what I 
> did:
>
> import matplotlib.pyplot as plt
> %matplotlib # responds with Using matplotlib backend: MacOSX
> plt.plot([1,2,3])  # gives white figure with nothing on it
>
> When I do a kernel restart and specify the qt backend it works fine
> (so I have a workaround), but I presume it should work, right?
>
> Thanks,
>
> Mark
>
>
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and
> Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration &
> more
> Get technology previously reserved for billion-dollar corporations,
> FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>

>>>
>>>
>>> --
>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>>> Get technology previously reserved for billion-dollar corporations, FREE
>>>
>>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
>>> ___
>>> Matplotlib-devel mailing list
>>> Matplotlib-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>>
>>>
>>
>>
>> --
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clk

Re: [matplotlib-devel] Axes.scatter call fails since removal of PyCXX

2014-11-18 Thread Thomas Caswell
Is there an issue for this (and if not can you make one)?

On Mon, Nov 17, 2014, 09:56 Joel B. Mohler  wrote:

> On Mon, Nov 17, 2014 at 09:36:50AM -0500, Joel B. Mohler wrote:
> > I think I see a breakage of the scatter call that I think should work
> and did
> > work before
> > https://github.com/matplotlib/matplotlib/commit/
> be34210a8c09fcd639ece583eb5c0acb855222b6
> >
> > This is running on windows 7 (32 bit) with numpy 1.8 and current master.
>
> Ugh, I tried this same example on my ubuntu box and it works.  I update
> this
> diagnosis to "scatter is broken on windows since removing PyCXX"; note
> that I
> do not get a traceback with the code below if I replace "scatter" with
> "plot".
>
> Being that windows devs are scarce, I'll be digging into this more.  I
> certainly welcome any clues as it seems very bizarre to me so far.
>
> Joel
>
> >
> > The example is:
> >
> > ***
> > import numpy
> > from matplotlib.backends.backend_agg import FigureCanvasAgg as
> FigureCanvas
> > from matplotlib.figure import Figure
> >
> > POINTS = 500
> >
> > figure = Figure(figsize=(6, 6), dpi=72)
> > ax = figure.add_subplot(1, 1, 1, projection=None)
> > scat = ax.scatter(numpy.arange(POINTS), numpy.sin(numpy.arange(POINTS)))
> > ***
> >
> > I get on current master
> >
> > ***
> > Traceback (most recent call last):
> >   File "C:\work\mpl_scatter_example.py", line 9, in 
> > scat = ax.scatter(numpy.arange(POINTS),
> numpy.sin(numpy.arange(POINTS)))
> >   File "C:\Python27\lib\site-packages\matplotlib\axes\_axes.py", line
> 3690, in scatter
> > self.add_collection(collection)
> >   File "C:\Python27\lib\site-packages\matplotlib\axes\_base.py", line
> 1459, in add_collection
> > self.update_datalim(collection.get_datalim(self.transData))
> >   File "C:\Python27\lib\site-packages\matplotlib\collections.py", line
> 198, in get_datalim
> > offsets, transOffset.frozen())
> >   File "C:\Python27\lib\site-packages\matplotlib\path.py", line 977, in
> get_path_collection_extents
> > master_transform, paths, transforms, offsets,offset_transform))
> > ValueError: object too deep for desired array
> > ***
> >
> > I did very little troubleshooting beyond confirming that this works
> before the
> > merge mentioned in the first paragraph.
> >
> > Joel
>
> 
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&;
> iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] tk backend broken (somehow?)

2014-11-18 Thread Benjamin Root
Why do we have a function in setupext.py called "hardcoded_tcl_config()"?
In any case, it looks like all I needed to do was change the default value
for line 156 to be the prefix location of my miniconda install, and things
started to work again!

Perhaps we need to take another look through setupext.py, and try to get it
using prefixes more (or at least consolidate all of these hard-coded values
into one place!)

Cheers!
Ben Root


On Tue, Nov 18, 2014 at 12:06 PM, Benjamin Root  wrote:

> Indeed, there are some oddities, but mostly with regards to Qt and forcing
> it to build and link against (presumedly) the conda package of it. There is
> a modification of the setupext.py that happens at build time to replace all
> instances of "/usr/local" with "$PREFIX". Perhaps what is happening is that
> my local builds of matplotlib is compiling and linking against my system
> install of the tk/tcl headers and libraries, and that might be conflicting
> with the conda-shipped tk/tcl packages?
>
> I'll have to experiment a bit more tonight. Thanks for the suggestion!
>
> Ben Root
>
> On Mon, Nov 17, 2014 at 11:07 PM, Thomas Caswell 
> wrote:
>
>> Have a look at the recipe in conda-rescipes for matplotlib, they might be
>> doing some funny patching.
>>
>> On Mon, Nov 17, 2014, 22:48 Benjamin Root  wrote:
>>
>>> Ok, I am just really confused now. I have confirmed that using the
>>> matplotlib supplied by miniconda (v1.4.2) works just fine. Ripping that out
>>> and building version 1.4.2 from source results in the traceback. Same thing
>>> for v1.3.1. I have even tried checking out PR#3811 which addresses the
>>> weird constructor issues we found today, and I still get the segfault.
>>>
>>> Maybe I should try getting out of the conda environment entirely and try
>>> EPD instead to see if that makes a difference?
>>>
>>> Ben Root
>>>
>>> On Mon, Nov 17, 2014 at 5:17 AM, Phil Elson 
>>> wrote:
>>>
 Mike made some changes to this recently.
 https://github.com/matplotlib/matplotlib/pull/3778

 May be the cause.

 On 16 November 2014 18:12, Benjamin Root  wrote:

> And with my continuing saga of backend-specific things...
>
> I was using conda, but because it does not ship with pygtk support, I
> had to manually install pygtk into the conda environment and then install
> matplotlib from source. All that seemed to work fine when I worked on Wx
> and Gtk examples for my book.
>
> I went back to a (previously working) Tk example to polish it, and I
> get all sorts of errors now. I have tried multiple releases of matplotlib
> from source (doing a git clean -fxd between them), all with similar 
> errors.
> In fact, with master, the error causes a segfault:
>
> ben@tigger:~/Documents/InteractiveMPL$ python chp5/slider_tk.py
> Exception in Tkinter callback
> Traceback (most recent call last):
>   File "/home/ben/miniconda/lib/python2.7/lib-tk/Tkinter.py", line
> 1486, in __call__
> return self.func(*args)
>   File
> "/home/ben/miniconda/lib/python2.7/site-packages/matplotlib-1.5.x-py2.7-linux-x86_64.egg/matplotlib/backends/backend_tkagg.py",
> line 278, in resize
> self.show()
>   File
> "/home/ben/miniconda/lib/python2.7/site-packages/matplotlib-1.5.x-py2.7-linux-x86_64.egg/matplotlib/backends/backend_tkagg.py",
> line 350, in draw
> tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
>   File
> "/home/ben/miniconda/lib/python2.7/site-packages/matplotlib-1.5.x-py2.7-linux-x86_64.egg/matplotlib/backends/tkagg.py",
> line 30, in blit
> id(data), colormode, id(bbox_array))
> TclError
> alloc: invalid block: 0x2cfe3b0: 0 0
> Aborted (core dumped)
>
> The line in question is (at least in v1.3.1, it is slightly different
> in more recent versions):
> tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode,
> id(bbox_array))
>
> This happens regardless of what example I use (my own or otherwise).
> There is no blit-specific code in the examples. All of this worked with 
> the
> conda-supplied matplotlib, but never the
> from-source-into-a-conda-environment install.
>
> Thoughts?
> Ben Root
>
>
> --
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push
> notifications.
> Take corrective actions from your mobile device.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>

>>> 
>>> --