mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-06 07:10:10 +08:00
Removed -x and -y options
The -x and -y options now stand for --xlabel and --ylabel. These options should be used to specify the series in the future.
This commit is contained in:
parent
858792fa99
commit
72a56659de
@ -58,10 +58,10 @@ module YouPlot
|
|||||||
parser.on('-t', '--title STR', String, 'print string on the top of plot') do |v|
|
parser.on('-t', '--title STR', String, 'print string on the top of plot') do |v|
|
||||||
params.title = v
|
params.title = v
|
||||||
end
|
end
|
||||||
parser.on('-x', '--xlabel STR', String, 'print string on the bottom of the plot') do |v|
|
parser.on('--xlabel STR', String, 'print string on the bottom of the plot') do |v|
|
||||||
params.xlabel = v
|
params.xlabel = v
|
||||||
end
|
end
|
||||||
parser.on('-y', '--ylabel STR', String, 'print string on the far left of the plot') do |v|
|
parser.on('--ylabel STR', String, 'print string on the far left of the plot') do |v|
|
||||||
params.ylabel = v
|
params.ylabel = v
|
||||||
end
|
end
|
||||||
parser.on('-w', '--width INT', Numeric, 'number of characters per row') do |v|
|
parser.on('-w', '--width INT', Numeric, 'number of characters per row') do |v|
|
||||||
|
@ -155,21 +155,11 @@ class YouPlotSimpleTest < Test::Unit::TestCase
|
|||||||
assert_equal fixture('simple-lineplot-xlabel.txt'), @stderr_file.read
|
assert_equal fixture('simple-lineplot-xlabel.txt'), @stderr_file.read
|
||||||
end
|
end
|
||||||
|
|
||||||
test :line_x do
|
|
||||||
YouPlot::Command.new(['line', '-x', 'X-LABEL']).run
|
|
||||||
assert_equal fixture('simple-lineplot-xlabel.txt'), @stderr_file.read
|
|
||||||
end
|
|
||||||
|
|
||||||
test :line_ylabel do
|
test :line_ylabel do
|
||||||
YouPlot::Command.new(['line', '--ylabel', 'Y-LABEL']).run
|
YouPlot::Command.new(['line', '--ylabel', 'Y-LABEL']).run
|
||||||
assert_equal fixture('simple-lineplot-ylabel.txt'), @stderr_file.read
|
assert_equal fixture('simple-lineplot-ylabel.txt'), @stderr_file.read
|
||||||
end
|
end
|
||||||
|
|
||||||
test :line_y do
|
|
||||||
YouPlot::Command.new(['line', '-y', 'Y-LABEL']).run
|
|
||||||
assert_equal fixture('simple-lineplot-ylabel.txt'), @stderr_file.read
|
|
||||||
end
|
|
||||||
|
|
||||||
test :line_width do
|
test :line_width do
|
||||||
YouPlot::Command.new(['line', '--width', '17']).run
|
YouPlot::Command.new(['line', '--width', '17']).run
|
||||||
assert_equal fixture('simple-lineplot-width-17.txt'), @stderr_file.read
|
assert_equal fixture('simple-lineplot-width-17.txt'), @stderr_file.read
|
||||||
|
Loading…
Reference in New Issue
Block a user