1.2

| home | graph lib | utility lib | custom lib | auxiliary lib | tutorials |

   Axis
   Blend
   Color
   ColorBar
   Fog
   Freetype
   Light
   Line
   Material
   Node
   Point
   Plot
   Polygon
   Render
   Scene
   Stencil
   TexCoord
   Text
   Texture
   Vertex

zeColorBar

Use .new("colorbar") to create the object for scientific or business plots. Position of zeColorBar refers to the global coordinate system. If the width is larger than the height, the bar is drawn horizontally; otherwise vertically.

:add(v, r, g, b)

v - the values that the color represents.
r - the red component of color.
g - the green component of color.
b - the blue component of color.

Adds the color for the value to the color table of zeColorBar.

:add(table)

table - a Lua table.

Adds the colors for data values using Lua table, which should contain only numbers in the order of data value and color components of red, green, and blue.

:font(obj)

obj - a zeFreetype (font) object.

Assigns a font object to be used for generating text.

:fontsize(size)

size - font size.

Sets the font size.

:get(value)

value - a number for the value that color represents.

Gets the color that represent the value. Returns red, green, blue to the caller.

:set(table)

table - a Lua table. Sets colorbar properties. Valid key-value paris are listed in the table.

Key Value Type Remark
color {r, g, b} Numbers (0 to 1) in table Sets the object's line and label color in red, green, and blue.
interpolation n Number (>0) Insert n-number of colors between current colors by interpolation
poisition {xoffset, yoffset, width, height} Numbers in table Sets colorbar position.
numberformat {digit, scientific} Number and Boolean in table Sets number format, i.e, the number of digits and whether or not to use scientific notation.
gradient flag Boolean Specifies gradient or discrete types of color bar.
enable flag Boolean Enable (default) and disable the object