mirror of
				https://github.com/red-data-tools/YouPlot.git
				synced 2025-11-04 11:38:10 +08:00 
			
		
		
		
	Removed count option for barplot
This commit is contained in:
		@@ -27,7 +27,6 @@ module Uplot
 | 
			
		||||
      headers   = parser.headers
 | 
			
		||||
      pass      = parser.pass
 | 
			
		||||
      output    = parser.output
 | 
			
		||||
      count     = parser.count
 | 
			
		||||
      fmt       = parser.fmt
 | 
			
		||||
      debug     = parser.debug
 | 
			
		||||
 | 
			
		||||
@@ -44,7 +43,7 @@ module Uplot
 | 
			
		||||
        pp @data if @debug
 | 
			
		||||
        plot = case command
 | 
			
		||||
               when :bar, :barplot
 | 
			
		||||
                 Plot.barplot(data, params, @count)
 | 
			
		||||
                 Plot.barplot(data, params)
 | 
			
		||||
               when :count, :c
 | 
			
		||||
                 Plot.barplot(data, params, count = true)
 | 
			
		||||
               when :hist, :histogram
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@ module Uplot
 | 
			
		||||
  class Command
 | 
			
		||||
    class Parser
 | 
			
		||||
      attr_reader :command, :params,
 | 
			
		||||
                  :delimiter, :transpose, :headers, :pass, :output, :count, :fmt, :debug
 | 
			
		||||
                  :delimiter, :transpose, :headers, :pass, :output, :fmt, :debug
 | 
			
		||||
 | 
			
		||||
      def initialize
 | 
			
		||||
        @command = nil
 | 
			
		||||
@@ -18,7 +18,6 @@ module Uplot
 | 
			
		||||
        @headers    = nil
 | 
			
		||||
        @pass       = false
 | 
			
		||||
        @output     = $stderr
 | 
			
		||||
        @count      = false
 | 
			
		||||
        @fmt        = 'xyy'
 | 
			
		||||
        @debug      = false
 | 
			
		||||
      end
 | 
			
		||||
@@ -125,9 +124,6 @@ module Uplot
 | 
			
		||||
            parser.on('--xscale VAL', String) do |v|
 | 
			
		||||
              params.xscale = v
 | 
			
		||||
            end
 | 
			
		||||
            parser.on('--count', TrueClass) do |v|
 | 
			
		||||
              @count = v
 | 
			
		||||
            end
 | 
			
		||||
 | 
			
		||||
          when :count, :c
 | 
			
		||||
            parser.on('--symbol VAL', String) do |v|
 | 
			
		||||
@@ -225,4 +221,4 @@ module Uplot
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user