module Tk::Tcllib::Plotchart::ChartMethod - tk-0.2.0 Documentation

# module Tk::Tcllib::Plotchart::ChartMethod

### Public Instance Methods

background(part, color_or_image, dir) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 199
    def background(part, color_or_image, dir)
      tk_call_without_enc(@chart, 'background',
                          part, color_or_image, dir)
      self
    end

balloon(*args) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 230
    def balloon(*args) # args => (x, y, text, dir) or ([x, y], text, dir)
      if args[0].kind_of?(Array)
        # args => ([x, y], text, dir)
        x, y = args.shift
      else
        # args => (x, y, text, dir)
        x = args.shift
        y = args.shift
      end

      text, dir = args

      tk_call_without_enc(@chart, 'balloon', x, y,
                          _get_eval_enc_str(text), dir)
      self
    end

balloonconfig(key, value=None) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 247
    def balloonconfig(key, value=None)
      if key.kind_of?(Hash)
        tk_call_without_enc(@chart, 'balloonconfig', *hash_kv(key, true))
      else
        tk_call(@chart, 'balloonconfig', "-#{key}", value)
      end
    end

coords_3D_to_pixel(x, y, z) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 296
    def coords_3D_to_pixel(x, y, z)
      list(tk_call_without_enc('::Plotchart::coords3DToPixel', @path, x, y, z))
    end

coords_to_pixel(x, y) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 292
    def coords_to_pixel(x, y)
      list(tk_call_without_enc('::Plotchart::coordsToPixel', @path, x, y))
    end

determine_scale(xmax, ymax) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 318
    def determine_scale(xmax, ymax)
      tk_call_without_enc('::Plotchart::determineScale', @path, xmax, ymax)
      self
    end

legend(series, text) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 224
    def legend(series, text)
      tk_call_without_enc(@chart, 'legend',
                          _get_eval_enc_str(series), _get_eval_enc_str(text))
      self
    end

legendconfig(key, value=None) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 215
    def legendconfig(key, value=None)
      if key.kind_of?(Hash)
        tk_call_without_enc(@chart, 'legendconfig', *hash_kv(key, true))
      else
        tk_call(@chart, 'legendconfig', "-#{key}", value)
      end
      self
    end

pixel_to_coords(x, y) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 314
    def pixel_to_coords(x, y)
      list(tk_call_without_enc('::Plotchart::pixelToCoords', @path, x, y))
    end

plaintext(*args) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 255
    def plaintext(*args) # args => (x, y, text, dir) or ([x, y], text, dir)
      if args[0].kind_of?(Array)
        # args => ([x, y], text, dir)
        x, y = args.shift
      else
        # args => (x, y, text, dir)
        x = args.shift
        y = args.shift
      end

      text, dir = args

      tk_call_without_enc(@chart, 'plaintext', x, y,
                          _get_eval_enc_str(text), dir)
      self
    end

plotpack(dir, *plots) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 300
    def plotpack(dir, *plots)
      tk_call_without_enc('::Plotchart::plotpack', @path, dir, *plots)
      self
    end

polar_coordinates(radmax) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 305
    def polar_coordinates(radmax)
      tk_call_without_enc('::Plotchart::polarCoordinates', @path, radmax)
      self
    end

polar_to_pixel(rad, phi) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 310
    def polar_to_pixel(rad, phi)
      list(tk_call_without_enc('::Plotchart::polarToPixel', @path, rad, phi))
    end

save_plot(filename) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 166
    def save_plot(filename)
      tk_call_without_enc(@chart, 'saveplot', filename)
      self
    end

set_zoom_pan() click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 323
    def set_zoom_pan()
      tk_call_without_enc('::Plotchart::setZoomPan', @path)
      self
    end

title(str) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 161
    def title(str)
      tk_call_without_enc(@chart, 'title', _get_eval_enc_str(str))
      self
    end

view_port(*args) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 274
    def view_port(*args) # args := pxmin, pymin, pxmax, pymax
      tk_call_without_enc('::Plotchart::viewPort', @path, *(args.flatten))
      self
    end

world_3D_coordinates(*args) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 285
    def world_3D_coordinates(*args)
      # args := xmin, ymin, zmin, xmax, ymax, zmax
      tk_call_without_enc('::Plotchart::world3DCoordinates',
                          @path, *(args.flatten))
      self
    end

world_coordinates(*args) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 279
    def world_coordinates(*args) # args := xmin, ymin, xmax, ymax
      tk_call_without_enc('::Plotchart::worldCoordinates',
                          @path, *(args.flatten))
      self
    end

xconfig(key, value=None) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 181
    def xconfig(key, value=None)
      if key.kind_of?(Hash)
        tk_call_without_enc(@chart, 'xconfig', *hash_kv(key, true))
      else
        tk_call(@chart, 'xconfig', "-#{key}",value)
      end
      self
    end

xtext(str) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 171
    def xtext(str)
      tk_call_without_enc(@chart, 'xtext', _get_eval_enc_str(str))
      self
    end

xticklines(color=None) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 205
    def xticklines(color=None)
      tk_call(@chart, 'xticklines', color)
      self
    end

yconfig(key, value=None) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 190
    def yconfig(key, value=None)
      if key.kind_of?(Hash)
        tk_call_without_enc(@chart, 'yconfig', *hash_kv(key, true))
      else
        tk_call(@chart, 'yconfig', "-#{key}", value)
      end
      self
    end

ytext(str) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 176
    def ytext(str)
      tk_call_without_enc(@chart, 'ytext', _get_eval_enc_str(str))
      self
    end

yticklines(color=None) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 210
    def yticklines(color=None)
      tk_call(@chart, 'yticklines', color)
      self
    end