Difference between revisions of "Template:Infobox general params"

From Pynomo
Jump to: navigation, search
(New page: {{Infobox_test1 | name = General main parameters | Field1a = 'filename' | Field1b = -- | Field1c = filename of generated pdf | Field2a = 'paper_height' | Field2b = 10.0 | Field2c = Heigh...)
 
Line 36: Line 36:
 
| Field9b = --
 
| Field9b = --
 
| Field9c = Title box width
 
| Field9c = Title box width
 +
 +
| Field10a = 'title_color'
 +
| Field10b = color.rgb.black
 +
| Field10c = Title color
 +
 +
| Field11a = 'make_grid'
 +
| Field11b = False
 +
| Field11c = If True, draws grid to help position texts, etc.
 +
 +
| Field12a = 'draw_lines'
 +
| Field12b = False
 +
| Field12c = If True, draws (brute-force) lines according to 'line_params'
 +
 +
| Field13a = 'line_params'
 +
| Field13b = []
 +
| Field13c = List of dics of (brute-force) lines. For example:
 +
<source lang=python>
 +
[{'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,
 +
}]
 +
</source>
 +
 +
| Field14a = 'pre_func'
 +
| Field14b = None
 +
| Field14c = PyX function(canvas) to draw under nomograph. Function definitin could be:
 +
<source lang=python>
 +
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))
 +
</source>
 +
 +
| Field15a = 'post_func'
 +
| Field15b = None
 +
| Field15c = PyX function(canvas) to draw over nomograph. Definiton same as for 'pre_func'.
 +
 +
| Field16a = 'debug'
 +
| Field16b = False
 +
| Field16c = If True, prints dicts of definions. Feature in PyNomo 0.2.1: not all default values are printed.
 
}}
 
}}

Revision as of 20:34, 30 July 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.