mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-09-18 18:08:07 +08:00
Remove Processing module
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'enumerable/statistics'
|
||||
|
||||
module YouPlot
|
||||
# plotting functions.
|
||||
module Backends
|
||||
module Processing
|
||||
module_function
|
||||
|
||||
def count_values(arr, tally: true)
|
||||
a = arr.value_counts
|
||||
[a.keys, a.values]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@@ -1,6 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'processing'
|
||||
require 'unicode_plot'
|
||||
|
||||
module YouPlot
|
||||
@@ -16,7 +15,7 @@ module YouPlot
|
||||
series = data.series
|
||||
# `uplot count`
|
||||
if count
|
||||
series = Processing.count_values(series[0])
|
||||
series = series[0].value_counts.yield_self { |h| [h.keys, h.values] }
|
||||
params.title = headers[0] if headers
|
||||
end
|
||||
if series.size == 1
|
||||
|
Reference in New Issue
Block a user