ruby-gr 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7feff4b6a6607304d914aa29fbd928eb8038373db422bb97ffc7f2f93e716eca
4
- data.tar.gz: c1e8c535bcc1f7643654e355d08941aa3b063b08073ab633a271fdb91658250c
3
+ metadata.gz: 8bdd0f52e766b5d109fcab86513a78fc32bc545718ac4aad1d6ccc6866b4a901
4
+ data.tar.gz: 1471589b9ea27e5911ed81e1f8f3f647bb59e631530ef518e9deb3b93e80faf1
5
5
  SHA512:
6
- metadata.gz: 7b11313f004e0e6fe8d8203be2aae5966f91404699179af1170af17fad1f4c0f48f8d8fc221813535bee6ae63fd26583520e18a15c26bac90bb79d2961090a91
7
- data.tar.gz: c28961f5c97d923ff9b1ae713d3f04fa4f77538febbf1de2ef44fce2b2d35c639a80fb74f3bed40b8b158ad73110108795a9d5e6ac0f7790032c0274562964b0
6
+ metadata.gz: d10aa589ce07c7ab339f7814db637bc6f39888ae6627b7552a3e6b77d19fd9f06048f7da5e52cae618b8631004d3a2959ff788083e036de2ca3963e2522ecbdc
7
+ data.tar.gz: 1a1ccc70707e0f8cee2287dc26e8386d52e83c860b6fe86d95fece16e60ae77d1bb48e69d1de926feae9ec53d443f35aac641561d9d704640f2c67dd311ea47c
@@ -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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GRCommons
4
- VERSION = '0.0.9'
4
+ VERSION = '0.0.10'
5
5
  end
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.9
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-19 00:00:00.000000000 Z
11
+ date: 2019-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler