Difference between revisions of "Template:Infobox general params"

From Pynomo
Jump to: navigation, search
Line 80: Line 80:
 
| Field16b = False
 
| Field16b = False
 
| Field16c = If True, prints dicts of definions. Feature in PyNomo 0.2.1: not all default values are printed.
 
| Field16c = If True, prints dicts of definions. Feature in PyNomo 0.2.1: not all default values are printed.
 +
 +
| Field17a = 'extra_texts'
 +
| Field17b = []
 +
| Field17c = List of dicts defining extra texts. Could be for example:
 +
<source lang=python>
 +
[{'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]
 +
}]
 +
</source>
 
}}
 
}}

Revision as of 20:14, 7 August 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' []

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]
 }]