mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-12-16 03:08:54 +08:00
Add color command
This commit is contained in:
@@ -193,6 +193,11 @@ module Uplot
|
||||
params.xlim = get_lim(v)
|
||||
end
|
||||
|
||||
parsers[:colors]
|
||||
.on('-n', '--names', TrueClass) do |v|
|
||||
@color_names = v
|
||||
end
|
||||
|
||||
# Preventing the generation of new sub-commands
|
||||
parsers.default = nil
|
||||
|
||||
@@ -242,6 +247,12 @@ module Uplot
|
||||
|
||||
def run
|
||||
parse_options
|
||||
|
||||
if command == :colors
|
||||
Plot.colors
|
||||
exit
|
||||
end
|
||||
|
||||
# Sometimes the input file does not end with a newline code.
|
||||
while input = Kernel.gets(nil)
|
||||
input.freeze
|
||||
|
||||
Reference in New Issue
Block a user