matplotlib 1.1.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/matplotlib/iruby.rb +22 -11
- data/lib/matplotlib/python/matplotlib_rb/backend_inline.py +1 -1
- data/lib/matplotlib/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7334bda6cc0621381716a316ebfa5c353bb1de7a9a82ac6879e495ea584eeb98
|
4
|
+
data.tar.gz: 78aa75e4304010baa83b088971955606e65e986ee33db9d3fc50104d803d86b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bb57eb1c829a2a72c458c8b853bb0d00814de85ae95c9929e97dcdf30e679fbfb2a2d56d86af4065e8fde6cef2869c692529cbbe8fd338bc9559f5feb1e6c1c
|
7
|
+
data.tar.gz: 74cad0aa922879af7c9ba64eb1b0ee8a6797ef0f14db18df98177eb0701ff9d0bdc3449598c1b99216b34ec3512e566b8ff916c1ce1e6e0095a944508bd8f849
|
data/lib/matplotlib/iruby.rb
CHANGED
@@ -65,13 +65,16 @@ module Matplotlib
|
|
65
65
|
@session.send(:publish, :error, content)
|
66
66
|
end
|
67
67
|
|
68
|
+
unless result.nil? || msg[:content]['silent']
|
69
|
+
@session.send(:publish, :execute_result,
|
70
|
+
data: ::IRuby::Display.display(result),
|
71
|
+
metadata: {},
|
72
|
+
execution_count: @execution_count)
|
73
|
+
end
|
74
|
+
|
68
75
|
trigger_event(:post_execute)
|
69
76
|
|
70
77
|
@session.send(:reply, :execute_reply, content)
|
71
|
-
@session.send(:publish, :execute_result,
|
72
|
-
data: ::IRuby::Display.display(result),
|
73
|
-
metadata: {},
|
74
|
-
execution_count: @execution_count) unless result.nil? || msg[:content]['silent']
|
75
78
|
end
|
76
79
|
end
|
77
80
|
|
@@ -211,13 +214,24 @@ module Matplotlib
|
|
211
214
|
# Temporally monky-patching IRuby kernel to enable flushing and closing figures.
|
212
215
|
# TODO: Make this feature a pull-request for sciruby/iruby.
|
213
216
|
kernel = ::IRuby::Kernel.instance
|
214
|
-
kernel.extend HookExtension
|
217
|
+
kernel.extend HookExtension unless kernel.respond_to?(:events)
|
215
218
|
if backend == GUI_BACKEND_MAP[:inline]
|
216
|
-
kernel.
|
219
|
+
if kernel.respond_to?(:register_event)
|
220
|
+
kernel.register_event(:post_execute, method(:flush_figures))
|
221
|
+
else
|
222
|
+
@post_execute_func = kernel.events.register(:post_execute, &method(:flush_figures))
|
223
|
+
end
|
224
|
+
|
217
225
|
# TODO: save original rcParams and overwrite rcParams with IRuby-specific configuration
|
218
226
|
new_backend_name = :inline
|
219
227
|
else
|
220
|
-
kernel.
|
228
|
+
if kernel.respond_to?(:unregister_event)
|
229
|
+
kernel.unregister_event(:post_execute, method(:flush_figures))
|
230
|
+
elsif @post_execute_func
|
231
|
+
kernel.events.unregister(:post_execute, @post_execute_func)
|
232
|
+
@post_execute_func = nil
|
233
|
+
end
|
234
|
+
|
221
235
|
# TODO: restore saved original rcParams
|
222
236
|
new_backend_name = :not_inline
|
223
237
|
end
|
@@ -242,10 +256,7 @@ module Matplotlib
|
|
242
256
|
kernel = ::IRuby::Kernel.instance
|
243
257
|
gcf.get_all_fig_managers.each do |fig_manager|
|
244
258
|
data = ::IRuby::Display.display(fig_manager.canvas.figure)
|
245
|
-
kernel.session.send(:publish, :
|
246
|
-
data: data,
|
247
|
-
metadata: {},
|
248
|
-
execution_count: kernel.instance_variable_get(:@execution_count))
|
259
|
+
kernel.session.send(:publish, :display_data, data: data, metadata: {})
|
249
260
|
end
|
250
261
|
ensure
|
251
262
|
unless gcf.get_all_fig_managers.nil?
|
@@ -1 +1 @@
|
|
1
|
-
from matplotlib.backends.backend_agg import new_figure_manager, FigureCanvasAgg
|
1
|
+
from matplotlib.backends.backend_agg import new_figure_manager, FigureCanvasAgg, FigureCanvas
|
data/lib/matplotlib/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
MATPLOTLIB_VERSION = "1.
|
1
|
+
MATPLOTLIB_VERSION = "1.3.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matplotlib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenta Murata
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pycall
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
|
-
rubygems_version: 3.
|
132
|
+
rubygems_version: 3.4.6
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: matplotlib wrapper for Ruby
|