interact with more than one figure at the same time
- Ngôn ngữ chính
- Julia
- Star
- 488
- Fork
- 90
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Start by reproducing the reported behavior from anc/exploratory.ipynb, especially the #plot spectrum cell, with Interact.jl, PyPlot, and IJulia. Compare the FontProperties traceback, random kernel exits, and empty figure output to determine whether multi-figure interaction is reliable; done means the notebook can control multiple figures without these failures.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- julia, jupyter, python
- Lĩnh vực
- data-visualization
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100