mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-06 15:11:12 +08:00
Fix style
This commit is contained in:
parent
7e42caa506
commit
0d7bac71d8
@ -1,5 +1,6 @@
|
|||||||
require 'optparse'
|
require 'optparse'
|
||||||
require 'csv'
|
require 'csv'
|
||||||
|
require 'unicode_plot'
|
||||||
|
|
||||||
module Uplot
|
module Uplot
|
||||||
class Command
|
class Command
|
||||||
@ -38,16 +39,16 @@ module Uplot
|
|||||||
def parse_options(argv)
|
def parse_options(argv)
|
||||||
main_parser = create_parser
|
main_parser = create_parser
|
||||||
parsers = Hash.new { |h, k| h[k] = create_parser }
|
parsers = Hash.new { |h, k| h[k] = create_parser }
|
||||||
parsers['bar'] .on('--count', TrueClass) { |v| @count = v }
|
|
||||||
parsers['barplot'] = parsers['bar']
|
parsers['barplot'] = parsers['bar']
|
||||||
|
.on('--count', TrueClass) { |v| @count = v }
|
||||||
parsers['count'] = parsers['c'] # barplot -c
|
parsers['count'] = parsers['c'] # barplot -c
|
||||||
parsers['hist'] .on('--nbins VAL', Numeric) { |v| @params[:nbins] = v }
|
|
||||||
parsers['histogram'] = parsers['hist']
|
parsers['histogram'] = parsers['hist']
|
||||||
parsers['line'] .on('-x', '--xlim VAL', String) { |v| @params[:xlim] = get_lim(v) }
|
.on('-n', '--nbins VAL', Numeric) { |v| @params[:nbins] = v }
|
||||||
parsers['lineplot'] = parsers['line']
|
parsers['lineplot'] = parsers['line']
|
||||||
|
.on('-x', '--xlim VAL', String) { |v| @params[:xlim] = get_lim(v) }
|
||||||
parsers['lineplots'] = parsers['lines']
|
parsers['lineplots'] = parsers['lines']
|
||||||
parsers['scatterplot'] = parsers['scatter']
|
parsers['scatter']
|
||||||
parsers['densityplot'] = parsers['density']
|
parsers['density']
|
||||||
parsers['boxplot'] = parsers['box']
|
parsers['boxplot'] = parsers['box']
|
||||||
parsers.default = nil
|
parsers.default = nil
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user