Skip to content

Commit 4779d4a

Browse files
committed
remove old rmagick code
1 parent 76848e8 commit 4779d4a

27 files changed

Lines changed: 1 addition & 2291 deletions

lib/rubyplot.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
require 'rubyplot/spi'
1414

1515
require 'grruby.so'
16-
require 'rubyplot/magick_wrapper'
1716
require 'rubyplot/gr_wrapper'
1817

1918
module Rubyplot

lib/rubyplot/artist/axes.rb

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Axes < Base
2626
# Array of plots contained in this Axes.
2727
attr_reader :plots
2828

29-
attr_reader :geometry, :font, :marker_font_size, :legend_font_size,
29+
attr_reader :font, :marker_font_size, :legend_font_size,
3030
:title_font_size, :scale, :font_color, :marker_color, :axes,
3131
:legend_margin, :backend, :marker_caps_height, :marker_font_size
3232

@@ -72,7 +72,6 @@ def initialize figure
7272
@raw_rows = width * (height/width)
7373

7474
@theme = Rubyplot::Themes::CLASSIC_WHITE
75-
@geometry = Rubyplot::MagickWrapper::Plot::Scatter::Geometry.new
7675
vera_font_path = File.expand_path('Vera.ttf', ENV['MAGICK_FONT_PATH'])
7776
@font = File.exist?(vera_font_path) ? vera_font_path : nil
7877
@font_color = "#000000"
@@ -298,41 +297,6 @@ def actually_draw
298297
@plots.each(&:draw)
299298
end
300299

301-
# Return a formatted string representing a number value that should be
302-
# printed as a label.
303-
def label_string(value, increment)
304-
label =
305-
if increment
306-
if increment >= 10 || (increment * 1) == (increment * 1).to_i.to_f
307-
format('%0i', value)
308-
elsif increment >= 1.0 || (increment * 10) == (increment * 10).to_i.to_f
309-
format('%0.1f', value)
310-
elsif increment >= 0.1 || (increment * 100) == (increment * 100).to_i.to_f
311-
format('%0.2f', value)
312-
elsif increment >= 0.01 || (increment * 1000) == (increment * 1000).to_i.to_f
313-
format('%0.3f', value)
314-
elsif increment >= 0.001 || (increment * 10_000) == (increment * 10_000).to_i.to_f
315-
format('%0.4f', value)
316-
else
317-
value.to_s
318-
end
319-
elsif ((@y_spread.to_f %
320-
(@geometry.marker_count.to_f == 0 ?
321-
1 : @geometry.marker_count.to_f) == 0) ||
322-
!@geometry.y_axis_increment .nil?)
323-
value.to_i.to_s
324-
elsif @y_spread > 10.0
325-
format('%0i', value)
326-
elsif @y_spread >= 3.0
327-
format('%0.2f', value)
328-
else
329-
value.to_s
330-
end
331-
parts = label.split('.')
332-
parts[0].gsub!(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1#{THOUSAND_SEPARATOR}")
333-
parts.join('.')
334-
end
335-
336300
def consolidate_plots
337301
bars = @plots.grep(Rubyplot::Artist::Plot::Bar)
338302
if !bars.empty?

lib/rubyplot/artist/plot/bar.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def num_bars
4242
end
4343

4444
def draw
45-
return unless @axes.geometry.has_data
4645
setup_bar_rectangles
4746
@rectangles.each(&:draw)
4847
end

lib/rubyplot/artist/plot/base.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,10 @@ def color= color
4141
def data x_values, y_values
4242
@data[:x_values] = x_values
4343
@data[:y_values] = y_values
44-
# Set column count if this is larger than previous column counts
45-
@axes.geometry.column_count = y_values.length > @axes.geometry.column_count ?
46-
y_values.length : @axes.geometry.column_count
4744
@y_min = @data[:y_values].min
4845
@y_max = @data[:y_values].max
4946
@x_min = @data[:x_values].min
5047
@x_max = @data[:x_values].max
51-
52-
@axes.geometry.has_data = true
5348
end
5449

5550
# Normalize original data to values between 0-1. Used for obtaining relative

lib/rubyplot/artist/plot/line.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def data x_values, y_values=[]
1616
end
1717

1818
def draw
19-
return unless @axes.geometry.has_data
2019
if @normalized_data[:x_values].size == 1
2120
draw_single_point
2221
else

lib/rubyplot/magick_wrapper.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)