JuliaPy / JuliaPy/PyPlot.jl

interact with more than one figure at the same time

Abierto
#122 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Julia
Estrellas
488
Forks
90
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I am trying to use Interact.jl with PyPlot to control various figures with a single slider. The notebook I have so far is at
http://nbviewer.ipython.org/github/berceanu/topo-photon/blob/master/anc/exploratory.ipynb
However, I am facing various problems.
1.
The first one is that _sometimes_ I get the following error instead of a plot as output of the `#plot spectrum` cell. If I then re-evaluate the cell, everything gets back to normal.

```
PyError (:PyObject_Call)
AttributeError("'FontProperties' object has no attribute '_family'",)
File "/usr/lib/python3.4/site-packages/matplotlib/backend_bases.py", line 2158, in print_figure
**kwargs)
File "/usr/lib/python3.4/site-packages/matplotlib/backends/backend_agg.py", line 521, in print_png
FigureCanvasAgg.draw(self)
File "/usr/lib/python3.4/site-packages/matplotlib/backends/backend_agg.py", line 469, in draw
self.figure.draw(self.renderer)
File "/usr/lib/python3.4/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/python3.4/site-packages/matplotlib/figure.py", line 1017, in draw
self.tight_layout(renderer, **self._tight_parameters)
File "/usr/lib/python3.4/site-packages/matplotlib/figure.py", line 1663, in tight_layout
rect=rect)
File "/usr/lib/python3.4/site-packages/matplotlib/tight_layout.py", line 352, in get_tight_layout_figure
pad=pad, h_pad=h_pad, w_pad=w_pad)
File "/usr/lib/python3.4/site-packages/matplotlib/tight_layout.py", line 129, in auto_adjust_subplotpars
tight_bbox_raw = union([ax.get_tightbbox(renderer) for ax in subplots])
File "/usr/lib/python3.4/site-packages/matplotlib/tight_layout.py", line 129, in
tight_bbox_raw = union([ax.get_tightbbox(renderer) for ax in subplots])
File "/usr/lib/python3.4/site-packages/matplotlib/axes/_base.py", line 3276, in get_tightbbox
bb_xaxis = self.xaxis.get_tightbbox(renderer)
File "/usr/lib/python3.4/site-packages/matplotlib/axis.py", line 1082, in get_tightbbox
renderer)
File "/usr/lib/python3.4/site-packages/matplotlib/axis.py", line 1065, in _get_tick_bboxes
extent = tick.label1.get_window_extent(renderer)
File "/usr/lib/python3.4/site-packages/matplotlib/text.py", line 798, in get_window_extent
bbox, info, descent = self._get_layout(self._renderer)
File "/usr/lib/python3.4/site-packages/matplotlib/text.py", line 293, in _get_layout
key = self.get_prop_tup()
File "/usr/lib/python3.4/site-packages/matplotlib/text.py", line 743, in get_prop_tup
hash(self._fontproperties),
File "/usr/lib/python3.4/site-packages/matplotlib/font_manager.py", line 702, in __hash__
l = (tuple(self.get_family()),
File "/usr/lib/python3.4/site-packages/matplotlib/font_manager.py", line 724, in get_family
if self._family is None:

in pyerr_check at /home/berceanu/.julia/v0.3/PyCall/src/exception.jl:58
in pycall at /home/berceanu/.julia/v0.3/PyCall/src/PyCall.jl:91
in fn at /home/berceanu/.julia/v0.3/PyCall/src/conversions.jl:181
in writemime at /home/berceanu/.julia/v0.3/PyPlot/src/PyPlot.jl:222
in writemime at /home/berceanu/.julia/v0.3/Interact/src/IJulia/setup.jl:91
in base64 at base64.jl:125
in display_dict at /home/berceanu/.julia/v0.3/IJulia/src/execute_request.jl:34
```
1. the second issue I am facing is that the kernel seems to die at random intervals, for no particular reason, which I find quite frustrating.
2. sometimes an empty figure frame is drawn and mixed with the output from other code cells

Am I doing something terribly wrong in my code? The non-plotting part of the code is well tested outside of IJulia, so I know that gives no issues.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.