mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-05 22:31:11 +08:00
Add count or c sub command.
This commit is contained in:
parent
d72c084602
commit
1fb369e26b
@ -39,6 +39,7 @@ module Uplot
|
||||
parsers['bar'] .on('-c', '--count', TrueClass) { |v| @count = v }
|
||||
parsers['barplot'] = parsers['bar']
|
||||
parsers['boxplot'] = parsers['box']
|
||||
parsers['count'] = parsers['c'] # barplot -c
|
||||
parsers.default = nil
|
||||
|
||||
main_parser.banner = <<~MSG
|
||||
@ -74,6 +75,9 @@ module Uplot
|
||||
barplot(data, headers)
|
||||
when 'box', 'boxplot'
|
||||
boxplot(data, headers)
|
||||
when 'count', 'c'
|
||||
@count = true
|
||||
barplot(data, headers)
|
||||
end.render($stderr)
|
||||
|
||||
print input if @output
|
||||
|
Loading…
Reference in New Issue
Block a user