Plegend

# Template Legend Space (Pls) module

class vcs.Plegend.Pls(member)[source]

The Template text object allows the manipulation of line type, width, and color index.

This class is used to define an line table entry used in VCS, or it can be used to change some or all of the line attributes in an existing line table entry.

Useful Functions:
# VCS Canvas Constructor
a=vcs.init()
# Show predefined line objects
a.show('line')
# Updates the VCS Canvas at user's request
a.update()
Make a Canvas object to work with:
a=vcs.init()
Create a new instance of line:
# Copies content of 'red' to 'new'
ln=a.createline('new','red')
# Copies content of 'default' to 'new'
ln=a.createline('new')
Modify an existing line:
ln=a.getline('red')
Overview of line attributes:
  • Listing line attributes:

    # Will list all the line attribute values
    ln.list()
    # Range from 1 to 256
    ln.color=100
    # Range from 1 to 300
    ln.width=100
    
  • Specifying the line type:

    # Same as ln.type=0
    ln.type='solid'
    # Same as ln.type=1
    ln.type='dash'
    # Same as ln.type=2
    ln.type='dot'
    # Same as ln.type=3
    ln.type='dash-dot'
    # Same as ln.type=4
    ln.type='long-dash'
    
arrow

length of extension arrows

offset

offset position of legend labels from legend colorbar, in % of page (can be negative)

x1

x1 position in % of page