Skip to content

Commit c4ab460

Browse files
committed
Change style
1 parent 88f6471 commit c4ab460

File tree

2 files changed

+89
-12
lines changed

2 files changed

+89
-12
lines changed

gr-plot.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
1818

1919
spec.required_ruby_version = '>= 2.5'
2020

21-
spec.add_dependency 'ruby-gr'
2221
spec.add_dependency 'histogram' # will be removed
22+
spec.add_dependency 'ruby-gr'
2323
end

lib/gr/plot.rb

Lines changed: 88 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,96 @@ class Plot
3131
# https://github.com/SciRuby/rubyplot
3232

3333
# Plot kinds conform to GR.jl
34-
PLOT_KIND = %i[line step scatter stem hist contour contourf hexbin heatmap
35-
nonuniformheatmap wireframe surface plot3 scatter3 imshow
36-
isosurface polar polarhist polarheatmap nonuniformpolarheatmap
37-
trisurf tricont shade volume].freeze
34+
PLOT_KIND = %i[
35+
line
36+
step
37+
scatter
38+
stem
39+
hist
40+
contour
41+
contourf
42+
hexbin
43+
heatmap
44+
nonuniformheatmap
45+
wireframe
46+
surface
47+
plot3
48+
scatter3
49+
imshow
50+
isosurface
51+
polar
52+
polarhist
53+
polarheatmap
54+
nonuniformpolarheatmap
55+
trisurf
56+
tricont
57+
shade
58+
volume
59+
].freeze
3860

3961
# Keyword options conform to GR.jl.
40-
KW_ARGS = %i[accelerate algorithm alpha ax backgroundcolor barwidth baseline
41-
clabels clear clim color colormap crange figsize font grid
42-
horizontal isovalue kind label labels levels linewidth location
43-
nbins ratio rotation scale size spec subplot tilt title update
44-
xaxis xflip xform xlabel xlim xlog xrange xticks yaxis yflip
45-
ylabel ylim ylog zflip yrange yticks viewport vp where window
46-
zaxis zlabel zlim zlog zrange zticks].freeze
62+
KW_ARGS = %i[
63+
accelerate
64+
algorithm
65+
alpha
66+
ax
67+
backgroundcolor
68+
barwidth
69+
baseline
70+
clabels
71+
clear
72+
clim
73+
color
74+
colormap
75+
crange
76+
figsize
77+
font
78+
grid
79+
horizontal
80+
isovalue
81+
kind
82+
label
83+
labels
84+
levels
85+
linewidth
86+
location
87+
nbins
88+
ratio
89+
rotation
90+
scale
91+
size
92+
spec
93+
subplot
94+
tilt
95+
title
96+
update
97+
viewport
98+
vp
99+
where
100+
window
101+
xaxis
102+
xflip
103+
xform
104+
xlabel
105+
xlim
106+
xlog
107+
xrange
108+
xticks
109+
yaxis
110+
yflip
111+
ylabel
112+
ylim
113+
ylog
114+
yrange
115+
yticks
116+
zaxis
117+
zflip
118+
zlabel
119+
zlim
120+
zlog
121+
zrange
122+
zticks
123+
].freeze
47124

48125
FONTS = {
49126
times_roman: 101,

0 commit comments

Comments
 (0)