ruby-gr 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gr/plot.rb +1 -1
- data/lib/gr_commons/jupyter_support.rb +9 -0
- data/lib/gr_commons/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bdd0f52e766b5d109fcab86513a78fc32bc545718ac4aad1d6ccc6866b4a901
|
4
|
+
data.tar.gz: 1471589b9ea27e5911ed81e1f8f3f647bb59e631530ef518e9deb3b93e80faf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d10aa589ce07c7ab339f7814db637bc6f39888ae6627b7552a3e6b77d19fd9f06048f7da5e52cae618b8631004d3a2959ff788083e036de2ca3963e2522ecbdc
|
7
|
+
data.tar.gz: 1a1ccc70707e0f8cee2287dc26e8386d52e83c860b6fe86d95fece16e60ae77d1bb48e69d1de926feae9ec53d443f35aac641561d9d704640f2c67dd311ea47c
|
data/lib/gr/plot.rb
CHANGED
@@ -947,7 +947,7 @@ module GR
|
|
947
947
|
|
948
948
|
def plot_args(args, _fmt = :xys)
|
949
949
|
# FIXME
|
950
|
-
args = [args] unless args.all? { |i| i.is_a? Array }
|
950
|
+
args = [args] unless args.all? { |i| i.is_a?(Array) && i[0].is_a?(Array) }
|
951
951
|
args.map do |xyzc|
|
952
952
|
x, y, z, c = xyzc.map do |i|
|
953
953
|
if i.is_a?(Array) || narray?(i)
|
@@ -21,6 +21,15 @@ module GRCommons
|
|
21
21
|
when 'svg'
|
22
22
|
data = File.read(ENV['GKS_FILEPATH'] + '.svg')
|
23
23
|
IRuby.display(data, mime: 'image/svg+xml') if display
|
24
|
+
when 'png', '322', '140'
|
25
|
+
data = File.read(ENV['GKS_FILEPATH'] + '.png')
|
26
|
+
IRuby.display(data, mime: 'image/png') if display
|
27
|
+
when 'jpg', '321', '144'
|
28
|
+
data = File.read(ENV['GKS_FILEPATH'] + '.jpg')
|
29
|
+
IRuby.display(data, mime: 'image/jpeg') if display
|
30
|
+
when 'gif', '130'
|
31
|
+
data = File.read(ENV['GKS_FILEPATH'] + '.gif')
|
32
|
+
IRuby.display(data, mime: 'image/gif') if display
|
24
33
|
when 'webm', 'ogg', 'mp4', 'mov'
|
25
34
|
require 'base64'
|
26
35
|
data = File.binread(ENV['GKS_FILEPATH'] + '.' + type)
|
data/lib/gr_commons/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-gr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kojix2
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|