In Files

  • tk/lib/tkextlib/tcllib/plotchart.rb

Class/Module Index [+]

Quicksearch

Tk::Tcllib::Plotchart::ChartMethod

Public Instance Methods

background(part, color_or_image, dir) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 198
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 229
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 246
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 295
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 291
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 317
def determine_scale(xmax, ymax)
  tk_call_without_enc('::Plotchart::determineScale', @path, xmax, ymax)
  self
end
            
legend(series, text) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 223
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 214
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 313
def pixel_to_coords(x, y)
  list(tk_call_without_enc('::Plotchart::pixelToCoords', @path, x, y))
end
            
plaintext(*args) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 254
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 299
def plotpack(dir, *plots)
  tk_call_without_enc('::Plotchart::plotpack', @path, dir, *plots)
  self
end
            
polar_coordinates(radmax) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 304
def polar_coordinates(radmax)
  tk_call_without_enc('::Plotchart::polarCoordinates', @path, radmax)
  self
end
            
polar_to_pixel(rad, phi) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 309
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 165
def save_plot(filename)
  tk_call_without_enc(@chart, 'saveplot', filename)
  self
end
            
set_zoom_pan() click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 322
def set_zoom_pan()
  tk_call_without_enc('::Plotchart::setZoomPan', @path)
  self
end
            
title(str) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 160
def title(str)
  tk_call_without_enc(@chart, 'title', _get_eval_enc_str(str))
  self
end
            
view_port(*args) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 273
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 284
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 278
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 180
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 170
def xtext(str)
  tk_call_without_enc(@chart, 'xtext', _get_eval_enc_str(str))
  self
end
            
xticklines(color=None) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 204
def xticklines(color=None)
  tk_call(@chart, 'xticklines', color)
  self
end
            
yconfig(key, value=None) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 189
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 tk/lib/tkextlib/tcllib/plotchart.rb, line 175
def ytext(str)
  tk_call_without_enc(@chart, 'ytext', _get_eval_enc_str(str))
  self
end
            
yticklines(color=None) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 209
def yticklines(color=None)
  tk_call(@chart, 'yticklines', color)
  self
end