No Graphics Method


Why doesn't VCS recognize my custom graphics method or other VCS object?


Here's one possible reason: the name for your new graphics method or other object is too long. 19 characters seems to be the longest name for graphics methods that CDAT will recognize without problems. For other objects, the limit is around 16 or 17 characters. Longer names may result in segmentation faults, strange errors, or may result in a plot that has a frame but no points.

Here's an example with too long of a graphics method name (I'm plotting part of a sine curve):

import vcs, Numeric
x = Numeric.arange(15)
y = Numeric.sin(x/Numeric.pi)
v = vcs.init()
xy_gm = v.createxvsy('mygreatgraphicsmethod','default')
v.xvsy(x, y, xy_gm, 'default')

Whoa, where's the plot? Here's what the plot is supposed to look like:

v = vcs.init()
xy_gm = v.createxvsy('mynewgraphicsmethod','default')
v.xvsy(x, y, xy_gm, 'default')

What a difference a few characters make :).

Notes: This discussion applies to CDAT 3.3.

Return to the Tips and Examples index page.

Updated: December 24, 2003 by Johnny Lin <email address>. License.