Difference between revisions of "Template:Infobox general params"

From Pynomo
Jump to: navigation, search
 
Line 104: Line 104:
 
  }]
 
  }]
 
</source>
 
</source>
 +
 +
| Field18a = 'isopleth_params'
 +
| Field18b = [{}]
 +
| Field18c = List of dicts defining isopleths. Could be for example:
 +
<source lang=python>
 +
[{'color':'MidnightBlue',
 +
  'linewidth':'THICK',
 +
  'linestyle':'dashdotted',
 +
  'transparency':0.2},
 +
  {'color':'Orange',
 +
  'linewidth':'THIN',
 +
  'linestyle':'dashdotted',
 +
  'transparency':0.9}]
 +
</source>
 +
 
}}
 
}}

Latest revision as of 19:48, 21 October 2009

General main parameters
Parameter Default value Explanation
'filename' --

filename of generated pdf

'paper_height' 10.0

Height of paper (roughly, ticks and texts extend this)

'paper_width' 10.0

Width of paper (roughly, ticks and texts extend this)

'block_params' --

List of blocks that make the nomograph

'transformations' --

List of transformations to transform nomograph

'title_str' --

Title string of nomograph

'title_x' --

Title x-position

'title_y' --

Title y-position

'title_box_width' --

Title box width

'title_color' color.rgb.black

Title color

'make_grid' False

If True, draws grid to help position texts, etc.

'draw_lines' False

If True, draws (brute-force) lines according to 'line_params'

'line_params' []

OBSOLETE, USE ISOPLETHS. List of dics of (brute-force) lines. For example:

[{'coords':[[0,0,1,1],[2,2,3,3]],
 'line_style':[color.cmyk.Black,
               style.linewidth.thick,
               style.linestyle.dashed],
 'circle_size':0.0005,
 'circle_color':color.cmyk.Black,
}]
'pre_func' None

PyX function(canvas) to draw under nomograph. Function definitin could be:

def post(c):
    c.stroke(path.line(2, 2, 15, 2) +
         path.line(15, 2, 10, 15) +
         path.line(15, 15, 2, 15) +
         path.line(2, 15, 2, 2))
'post_func' None

PyX function(canvas) to draw over nomograph. Definiton same as for 'pre_func'.

'debug' False

If True, prints dicts of definions. Feature in PyNomo 0.2.1: not all default values are printed.

'extra_texts' []

List of dicts defining extra texts. Could be for example:

[{'x':1.0,
  'y':1.0,
  'text':'testing',
  'width':5,
  'pyx_extra_defs':[color.rgb.red,text.size.Huge]
 },
 {'x':1.0,
  'y':2.0,
  'text':'testing',
  'width':5,
  'pyx_extra_defs':[color.rgb.green]
 },
 {'x':1.0,
  'y':3.0,
  'text':r"line \par break",
  'width':5,
  'pyx_extra_defs':[color.rgb.blue,text.size.tiny]
 }]
'isopleth_params' [{}]

List of dicts defining isopleths. Could be for example:

[{'color':'MidnightBlue',
  'linewidth':'THICK',
  'linestyle':'dashdotted',
  'transparency':0.2},
  {'color':'Orange',
   'linewidth':'THIN',
   'linestyle':'dashdotted',
   'transparency':0.9}]