Class: Tioga::Page_Frame_Bounds
- Inherits:
-
Object
- Object
- Tioga::Page_Frame_Bounds
- Defined in:
- lib/Tioga/Page_Frame_Bounds.rb
Instance Method Summary collapse
-
#bounds_bottom ⇒ Object
:call-seq: bounds_bottom .
-
#bounds_height ⇒ Object
:call-seq: bounds_height .
-
#bounds_left ⇒ Object
:call-seq: bounds_left .
-
#bounds_right ⇒ Object
:call-seq: bounds_right .
-
#bounds_top ⇒ Object
:call-seq: bounds_top .
-
#bounds_width ⇒ Object
:call-seq: bounds_width .
-
#bounds_xmax ⇒ Object
:call-seq: bounds_xmax .
-
#bounds_xmin ⇒ Object
:call-seq: bounds_xmin .
-
#bounds_ymax ⇒ Object
:call-seq: bounds_ymax .
-
#bounds_ymin ⇒ Object
:call-seq: bounds_ymin .
-
#column_margins(dict) ⇒ Object
Returns a dictionary with entries for ‘left_margin’ and ‘right_margin’ suitable for use with set_subframe.
-
#convert_figure_to_frame_dx(dx) ⇒ Object
Convert the distance dx measured in figure x coordinates to the distance in frame x coordinates.
-
#convert_figure_to_frame_dy(dy) ⇒ Object
Convert the distance dy measured in figure y coordinates to the distance in frame y coordinates.
-
#convert_figure_to_frame_x(x) ⇒ Object
Convert the position x measured in figure x coordinates to the position in frame x coordinates.
-
#convert_figure_to_frame_y(y) ⇒ Object
Convert the position y measured in figure y coordinates to the position in frame y coordinates.
-
#convert_figure_to_output_dx(dx) ⇒ Object
Convert the distance dx measured in figure x coordinates to the distance in output x coordinates.
-
#convert_figure_to_output_dy(dy) ⇒ Object
Convert the distance dy measured in figure y coordinates to the distance in output y coordinates.
-
#convert_figure_to_output_x(x) ⇒ Object
Convert the position x measured in figure x coordinates to the position in output x coordinates.
-
#convert_figure_to_output_y(y) ⇒ Object
Convert the position y measured in figure y coordinates to the position in output y coordinates.
-
#convert_frame_to_figure_dx(dx) ⇒ Object
Convert the distance dx measured in frame x coordinates to the distance in figure x coordinates.
-
#convert_frame_to_figure_dy(dy) ⇒ Object
Convert the distance dy measured in frame y coordinates to the distance in figure y coordinates.
-
#convert_frame_to_figure_x(x) ⇒ Object
Convert the position x measured in frame x coordinates to the position in figure x coordinates.
-
#convert_frame_to_figure_y(y) ⇒ Object
Convert the position y measured in frame y coordinates to the position in figure y coordinates.
-
#convert_frame_to_page_dx(dx) ⇒ Object
Convert the distance dx measured in frame x coordinates to the distance in page x coordinates.
-
#convert_frame_to_page_dy(dy) ⇒ Object
Convert the distance dy measured in frame y coordinates to the distance in page y coordinates.
-
#convert_frame_to_page_x(x) ⇒ Object
Convert the position x measured in frame x coordinates to the position in page x coordinates.
-
#convert_frame_to_page_y(y) ⇒ Object
Convert the position y measured in frame y coordinates to the position in page y coordinates.
-
#convert_inches_to_output(d) ⇒ Object
Convert the distance d measured in inches to output coordinates.
-
#convert_mm_to_output(d) ⇒ Object
Convert the distance d measured in millimeters to output coordinates.
-
#convert_output_to_figure_dx(dx) ⇒ Object
Convert the distance dx measured in output x coordinates to the distance in figure x coordinates.
-
#convert_output_to_figure_dy(dy) ⇒ Object
Convert the distance dy measured in output y coordinates to the distance in figure y coordinates.
-
#convert_output_to_figure_x(x) ⇒ Object
Convert the position x measured in output x coordinates to the position in figure x coordinates.
-
#convert_output_to_figure_y(y) ⇒ Object
Convert the position y measured in output y coordinates to the position in figure y coordinates.
-
#convert_output_to_inches(d) ⇒ Object
Convert the distance d measured in output coordinates to inches.
-
#convert_output_to_mm(d) ⇒ Object
Convert the distance d measured in output coordinates to millimeters.
-
#convert_output_to_page_dx(dx) ⇒ Object
Convert the distance dx measured in output x coordinates to the distance in page x coordinates.
-
#convert_output_to_page_dy(dy) ⇒ Object
Convert the distance dy measured in output y coordinates to the same distance in page y coordinates.
-
#convert_output_to_page_x(x) ⇒ Object
Convert the position x measured in output x coordinates to the position in page x coordinates.
-
#convert_output_to_page_y(y) ⇒ Object
Convert the position y measured in output y coordinates to the position in page y coordinates.
-
#convert_page_to_frame_dx(dx) ⇒ Object
Convert the distance dx measured in page x coordinates to the distance in frame x coordinates.
-
#convert_page_to_frame_dy(dy) ⇒ Object
Convert the distance dy measured in page y coordinates to the distance in frame y coordinates.
-
#convert_page_to_frame_x(x) ⇒ Object
Convert the position x measured in page x coordinates to the position in frame x coordinates.
-
#convert_page_to_frame_y(y) ⇒ Object
Convert the position y measured in page y coordinates to the position in frame y coordinates.
-
#convert_page_to_output_dx(dx) ⇒ Object
Convert the distance dx measured in page x coordinates to the distance in output x coordinates.
-
#convert_page_to_output_dy(dy) ⇒ Object
Convert the distance dy measured in page y coordinates to the distance in output y coordinates.
-
#convert_page_to_output_x(x) ⇒ Object
Convert the position x measured in page x coordinates to the position in output x coordinates.
-
#convert_page_to_output_y(y) ⇒ Object
Convert the position y measured in page y coordinates to the position in output y coordinates.
-
#convert_to_degrees(dx, dy) ⇒ Object
Returns the angle measured in degrees clockwise from the horizontal for the slope specified by dx and dy given in figure coordinates.
-
#frame_bottom ⇒ Object
:call-seq: frame_bottom .
-
#frame_height ⇒ Object
:call-seq: frame_height .
-
#frame_left ⇒ Object
:call-seq: frame_left .
-
#frame_right ⇒ Object
:call-seq: frame_right .
-
#frame_top ⇒ Object
:call-seq: frame_top .
-
#frame_width ⇒ Object
:call-seq: frame_width .
-
#page_bottom ⇒ Object
:call-seq: page_bottom .
-
#page_height ⇒ Object
:call-seq: page_height .
-
#page_left ⇒ Object
:call-seq: page_left .
-
#page_right ⇒ Object
:call-seq: page_right .
-
#page_top ⇒ Object
:call-seq: page_top .
-
#page_width ⇒ Object
:call-seq: page_width .
-
#row_margins(dict) ⇒ Object
Returns a dictionary with entries for ‘top_margin’ and ‘bottom_margin’ suitable for use with set_subframe.
-
#set_bounds(dict = nil) ⇒ Object
Sets the bounds according to the entries in the dictionary argument (called by show_plot).
-
#set_device_pagesize(width, height) ⇒ Object
:call-seq: set_device_pagesize(width, height) # measured in output page coordinates (1/720 inch) .
-
#set_frame_sides(left, right, top, bottom) ⇒ Object
:call-seq: set_frame_sides(left, right, top, bottom) # sizes in page coords [0..1] .
-
#set_subframe(dict = nil) ⇒ Object
Adjusts frame margins according to the entries in the dictionary argument.
-
#tex_preamble ⇒ Object
:call-seq: tex_preamble tex_preamble = a_string.
Instance Method Details
#bounds_bottom ⇒ Object
:call-seq:
bounds_bottom
The position of the bottom of the frame in the figure coordinate system. Initialized to 0.0 and changed by set_bounds.
181 182 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 181 def bounds_bottom end |
#bounds_height ⇒ Object
:call-seq:
bounds_height
The height of the frame in figure coordinates. Initialized to 1.0 and changed by set_bounds.
205 206 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 205 def bounds_height end |
#bounds_left ⇒ Object
:call-seq:
bounds_left
The position of the left of the frame in the figure coordinate system. Initialized to 0.0 and changed by set_bounds.
165 166 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 165 def bounds_left end |
#bounds_right ⇒ Object
:call-seq:
bounds_right
The position of the right of the frame in the figure coordinate system. Initialized to 1.0 and changed by set_bounds.
173 174 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 173 def bounds_right end |
#bounds_top ⇒ Object
:call-seq:
bounds_top
The position of the top of the frame in the figure coordinate system. Initialized to 1.0 and changed by set_bounds.
189 190 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 189 def bounds_top end |
#bounds_width ⇒ Object
:call-seq:
bounds_width
The width of the frame in figure coordinates. Initialized to 1.0 and changed by set_bounds.
197 198 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 197 def bounds_width end |
#bounds_xmax ⇒ Object
:call-seq:
bounds_xmax
The maximum x figure coordinate that is inside the frame. Initialized to 1.0 and changed by set_bounds.
221 222 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 221 def bounds_xmax end |
#bounds_xmin ⇒ Object
:call-seq:
bounds_xmin
The minimum x figure coordinate that is inside the frame. Initialized to 0.0 and changed by set_bounds.
213 214 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 213 def bounds_xmin end |
#bounds_ymax ⇒ Object
:call-seq:
bounds_ymax
The maximum y figure coordinate that is inside the frame. Initialized to 1.0 and changed by set_bounds.
237 238 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 237 def bounds_ymax end |
#bounds_ymin ⇒ Object
:call-seq:
bounds_ymin
The minimum y figure coordinate that is inside the frame. Initialized to 0.0 and changed by set_bounds.
229 230 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 229 def bounds_ymin end |
#column_margins(dict) ⇒ Object
Returns a dictionary with entries for ‘left_margin’ and ‘right_margin’ suitable for use with set_subframe. The margins are determined by the column specifications in the argument dict. The leftmost column is number 1 and the number of columns equals the column number for the rightmost column. The entries ‘left_margin’ and ‘right_margin’ determine the space outside the columns, and ‘column_margin’ is the space between columns, all given as fractions of the frame width. The space between the outer margins is divided to make room for ‘num_columns’ of equally wide columns. The returned margins bracket the requested ‘column’, or the requested range of columns from ‘first_column’ to ‘last_column’, inclusive. See also row_margins.
Dictionary Entries
'left_margin' => a_float # default is 0
'right_margin' => a_float # default is 0
'column_margin' => a_float # default is 0
'column' => an_integer
'first_column' => an_integer # default is 1
'last_column' => an_integer # default is 'first_column'
'num_columns' => an_integer # default is 'last_column'
Example
def columns
t.set_aspect_ratio(2)
t.rescale(0.8)
t.do_box_labels(
'Blues, Reds, Greens',
'Position',
'Values for Colors')
num_plots = 3
t.subplot(t.column_margins('num_columns' => 3, 'column' => 1)) do
t.right_edge_type = AXIS_HIDDEN
blues
end
t.subplot(t.column_margins('num_columns' => 3, 'column' => 2)) do
t.yaxis_type = AXIS_WITH_TICKS_ONLY
t.right_edge_type = AXIS_HIDDEN
reds
end
t.subplot(t.column_margins('num_columns' => 3, 'column' => 3)) do
t.yaxis_type = AXIS_WITH_TICKS_ONLY
t.right_edge_type = AXIS_WITH_TICKS_ONLY
greens
end
end
310 311 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 310 def column_margins(dict) end |
#convert_figure_to_frame_dx(dx) ⇒ Object
Convert the distance dx measured in figure x coordinates to the distance in frame x coordinates.
475 476 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 475 def convert_figure_to_frame_dx(dx) end |
#convert_figure_to_frame_dy(dy) ⇒ Object
Convert the distance dy measured in figure y coordinates to the distance in frame y coordinates.
480 481 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 480 def convert_figure_to_frame_dy(dy) end |
#convert_figure_to_frame_x(x) ⇒ Object
Convert the position x measured in figure x coordinates to the position in frame x coordinates.
465 466 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 465 def convert_figure_to_frame_x(x) end |
#convert_figure_to_frame_y(y) ⇒ Object
Convert the position y measured in figure y coordinates to the position in frame y coordinates.
470 471 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 470 def convert_figure_to_frame_y(y) end |
#convert_figure_to_output_dx(dx) ⇒ Object
Convert the distance dx measured in figure x coordinates to the distance in output x coordinates.
515 516 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 515 def convert_figure_to_output_dx(dx) end |
#convert_figure_to_output_dy(dy) ⇒ Object
Convert the distance dy measured in figure y coordinates to the distance in output y coordinates.
520 521 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 520 def convert_figure_to_output_dy(dy) end |
#convert_figure_to_output_x(x) ⇒ Object
Convert the position x measured in figure x coordinates to the position in output x coordinates.
505 506 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 505 def convert_figure_to_output_x(x) end |
#convert_figure_to_output_y(y) ⇒ Object
Convert the position y measured in figure y coordinates to the position in output y coordinates.
510 511 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 510 def convert_figure_to_output_y(y) end |
#convert_frame_to_figure_dx(dx) ⇒ Object
Convert the distance dx measured in frame x coordinates to the distance in figure x coordinates.
495 496 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 495 def convert_frame_to_figure_dx(dx) end |
#convert_frame_to_figure_dy(dy) ⇒ Object
Convert the distance dy measured in frame y coordinates to the distance in figure y coordinates.
500 501 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 500 def convert_frame_to_figure_dy(dy) end |
#convert_frame_to_figure_x(x) ⇒ Object
Convert the position x measured in frame x coordinates to the position in figure x coordinates.
485 486 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 485 def convert_frame_to_figure_x(x) end |
#convert_frame_to_figure_y(y) ⇒ Object
Convert the position y measured in frame y coordinates to the position in figure y coordinates.
490 491 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 490 def convert_frame_to_figure_y(y) end |
#convert_frame_to_page_dx(dx) ⇒ Object
Convert the distance dx measured in frame x coordinates to the distance in page x coordinates.
455 456 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 455 def convert_frame_to_page_dx(dx) end |
#convert_frame_to_page_dy(dy) ⇒ Object
Convert the distance dy measured in frame y coordinates to the distance in page y coordinates.
460 461 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 460 def convert_frame_to_page_dy(dy) end |
#convert_frame_to_page_x(x) ⇒ Object
Convert the position x measured in frame x coordinates to the position in page x coordinates.
445 446 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 445 def convert_frame_to_page_x(x) end |
#convert_frame_to_page_y(y) ⇒ Object
Convert the position y measured in frame y coordinates to the position in page y coordinates.
450 451 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 450 def convert_frame_to_page_y(y) end |
#convert_inches_to_output(d) ⇒ Object
Convert the distance d measured in inches to output coordinates.
378 379 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 378 def convert_inches_to_output(d) end |
#convert_mm_to_output(d) ⇒ Object
Convert the distance d measured in millimeters to output coordinates.
370 371 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 370 def convert_mm_to_output(d) end |
#convert_output_to_figure_dx(dx) ⇒ Object
Convert the distance dx measured in output x coordinates to the distance in figure x coordinates.
535 536 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 535 def convert_output_to_figure_dx(dx) end |
#convert_output_to_figure_dy(dy) ⇒ Object
Convert the distance dy measured in output y coordinates to the distance in figure y coordinates.
540 541 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 540 def convert_output_to_figure_dy(dy) end |
#convert_output_to_figure_x(x) ⇒ Object
Convert the position x measured in output x coordinates to the position in figure x coordinates.
525 526 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 525 def convert_output_to_figure_x(x) end |
#convert_output_to_figure_y(y) ⇒ Object
Convert the position y measured in output y coordinates to the position in figure y coordinates.
530 531 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 530 def convert_output_to_figure_y(y) end |
#convert_output_to_inches(d) ⇒ Object
Convert the distance d measured in output coordinates to inches.
374 375 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 374 def convert_output_to_inches(d) end |
#convert_output_to_mm(d) ⇒ Object
Convert the distance d measured in output coordinates to millimeters.
366 367 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 366 def convert_output_to_mm(d) end |
#convert_output_to_page_dx(dx) ⇒ Object
Convert the distance dx measured in output x coordinates to the distance in page x coordinates.
415 416 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 415 def convert_output_to_page_dx(dx) end |
#convert_output_to_page_dy(dy) ⇒ Object
Convert the distance dy measured in output y coordinates to the same distance in page y coordinates.
420 421 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 420 def convert_output_to_page_dy(dy) end |
#convert_output_to_page_x(x) ⇒ Object
Convert the position x measured in output x coordinates to the position in page x coordinates.
405 406 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 405 def convert_output_to_page_x(x) end |
#convert_output_to_page_y(y) ⇒ Object
Convert the position y measured in output y coordinates to the position in page y coordinates.
410 411 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 410 def convert_output_to_page_y(y) end |
#convert_page_to_frame_dx(dx) ⇒ Object
Convert the distance dx measured in page x coordinates to the distance in frame x coordinates.
435 436 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 435 def convert_page_to_frame_dx(dx) end |
#convert_page_to_frame_dy(dy) ⇒ Object
Convert the distance dy measured in page y coordinates to the distance in frame y coordinates.
440 441 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 440 def convert_page_to_frame_dy(dy) end |
#convert_page_to_frame_x(x) ⇒ Object
Convert the position x measured in page x coordinates to the position in frame x coordinates.
425 426 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 425 def convert_page_to_frame_x(x) end |
#convert_page_to_frame_y(y) ⇒ Object
Convert the position y measured in page y coordinates to the position in frame y coordinates.
430 431 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 430 def convert_page_to_frame_y(y) end |
#convert_page_to_output_dx(dx) ⇒ Object
Convert the distance dx measured in page x coordinates to the distance in output x coordinates.
395 396 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 395 def convert_page_to_output_dx(dx) end |
#convert_page_to_output_dy(dy) ⇒ Object
Convert the distance dy measured in page y coordinates to the distance in output y coordinates.
400 401 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 400 def convert_page_to_output_dy(dy) end |
#convert_page_to_output_x(x) ⇒ Object
Convert the position x measured in page x coordinates to the position in output x coordinates.
384 385 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 384 def convert_page_to_output_x(x) end |
#convert_page_to_output_y(y) ⇒ Object
Convert the position y measured in page y coordinates to the position in output y coordinates.
390 391 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 390 def convert_page_to_output_y(y) end |
#convert_to_degrees(dx, dy) ⇒ Object
Returns the angle measured in degrees clockwise from the horizontal for the slope specified by dx and dy given in figure coordinates.
545 546 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 545 def convert_to_degrees(dx, dy) end |
#frame_bottom ⇒ Object
:call-seq:
frame_bottom
The position of the bottom of the frame in the page y coordinate system which runs from 0 at the bottom to 1 at the top. Initialized to 0.2 and changed by set_subframe.
133 134 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 133 def frame_bottom end |
#frame_height ⇒ Object
:call-seq:
frame_height
The height of the frame in page coordinates. Initialized to 0.6 and changed by set_subframe.
157 158 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 157 def frame_height end |
#frame_left ⇒ Object
:call-seq:
frame_left
The position of the left of the frame in the page x coordinate system which runs from 0 at the left to 1 at the right. Initialized to 0.2 and changed by set_subframe.
117 118 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 117 def frame_left end |
#frame_right ⇒ Object
:call-seq:
frame_right
The position of the right of the frame in the page x coordinate system which runs from 0 at the left to 1 at the right. Initialized to 0.8 and changed by set_subframe.
125 126 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 125 def frame_right end |
#frame_top ⇒ Object
:call-seq:
frame_top
The position of the top of the frame in the page y coordinate system which runs from 0 at the bottom to 1 at the top. Initialized to 0.8 and changed by set_subframe.
141 142 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 141 def frame_top end |
#frame_width ⇒ Object
:call-seq:
frame_width
The width of the frame in page coordinates. Initialized to 0.6 and changed by set_subframe.
149 150 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 149 def frame_width end |
#page_bottom ⇒ Object
:call-seq:
page_bottom
The position of the bottom of the page in the device coordinate system – measured in output page coordinates (1/720 inch).
80 81 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 80 def page_bottom end |
#page_height ⇒ Object
:call-seq:
page_height
The height of the page in the device coordinate system – measured in output page coordinates (1/720 inch).
101 102 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 101 def page_height end |
#page_left ⇒ Object
:call-seq:
page_left
The position of the left of the page in the device coordinate system – measured in output page coordinates (1/720 inch).
66 67 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 66 def page_left end |
#page_right ⇒ Object
:call-seq:
page_right
The position of the right of the page in the device coordinate system – measured in output page coordinates (1/720 inch).
73 74 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 73 def page_right end |
#page_top ⇒ Object
:call-seq:
page_top
The position of the top of the page in the device coordinate system – measured in output page coordinates (1/720 inch).
87 88 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 87 def page_top end |
#page_width ⇒ Object
:call-seq:
page_width
The width of the page in the device coordinate system – measured in output page coordinates (1/720 inch).
94 95 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 94 def page_width end |
#row_margins(dict) ⇒ Object
Returns a dictionary with entries for ‘top_margin’ and ‘bottom_margin’ suitable for use with set_subframe. The margins are determined by the row specifications in the argument dict. The uppermost row is number 1 and the number of rows equals the row number for the bottom-most row. The entries ‘top_margin’ and ‘bottom_margin’ determine the space above and below the rows, and ‘row_margin’ is the space between rows, all given as fractions of the frame height. The space between the outer margins is divided to make room for ‘num_rows’ of equally tall rows. The returned margins bracket the requested ‘row’, or the requested range of rows from ‘first_row’ to ‘last_row’, inclusive. See also column_margins.
Dictionary Entries
'top_margin' => a_float # default is 0
'bottom_margin' => a_float # default is 0
'row_margin' => a_float # default is 0
'row' => an_integer
'first_row' => an_integer # default is 1
'last_row' => an_integer # default is 'first_row'
'num_rows' => an_integer # default is 'last_row'
332 333 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 332 def row_margins(dict) end |
#set_bounds(dict = nil) ⇒ Object
Sets the bounds according to the entries in the dictionary argument (called by show_plot).
The values of the entries are the figure coordinates for the edges of the frame. The following attributes are changed: bounds_left, bounds_right, bounds_bottom, bounds_top, xaxis_reversed, bounds_xmin, bounds_xmax, bounds_width, yaxis_reversed, bounds_ymin, bounds_ymax, bounds_height, default_text_height_dx, and default_text_height_dy.
Dictionary Entries
'bounds_left' => a_float # required
'bounds_right' => a_float # required
'bounds_top' => a_float # required
'bounds_bottom' => a_float # required
'left_boundary' # alias for 'bounds_left'
'right_boundary' # alias for 'bounds_right'
'top_boundary' # alias for 'bounds_top'
'bottom_boundary' # alias for 'bounds_bottom'
The following forms are also supported for calls to set_bounds:
set_bounds('boundaries' => [ left, right, top, bottom ])
set_bounds([ left, right, top, bottom ])
360 361 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 360 def set_bounds(dict=nil) end |
#set_device_pagesize(width, height) ⇒ Object
:call-seq:
set_device_pagesize(width, height) # measured in output page coordinates (1/720 inch)
The page coordinates go from 0.0 to 1.0 with (0,0) at the lower left and (1,1) at the upper right. This command sets the physical size of this rectangle in the output coordinate
59 60 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 59 def set_device_pagesize(width, height) end |
#set_frame_sides(left, right, top, bottom) ⇒ Object
:call-seq:
set_frame_sides(left, right, top, bottom) # sizes in page coords [0..1]
This command sets frame_left, frame_right, frame_top, and frame_bottom to the given values.
109 110 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 109 def set_frame_sides(left, right, top, bottom) end |
#set_subframe(dict = nil) ⇒ Object
Adjusts frame margins according to the entries in the dictionary argument.
Note that this does not automatically adjust the clipping rectangle to the new frame. If you want the clipping changed, call clip_to_frame after calling set_subframe.
Dictionary Entries
'left_margin' => a_float # optional
'right_margin' => a_float # optional
'top_margin' => a_float # optional
'bottom_margin' => a_float # optional
'left' # alias for 'left_margin'
'right' # alias for 'right_margin'
'top' # alias for 'top_margin'
'bottom' # alias for 'bottom_margin'
The following forms are also supported for calls to set_subframe:
set_subframe('margins' => [ left, right, top, bottom ])
set_subframe([ left, right, top, bottom ])
261 262 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 261 def set_subframe(dict=nil) end |
#tex_preamble ⇒ Object
:call-seq:
tex_preamble
tex_preamble = a_string
This string will be used as the “preamble” for the TeX file. The default does “usepackage” commands for “color” and “geometry”. You may want to use some other packages as well. Here’s an example of how to do it which adds the ‘marvosym’ package by inserting the following line into the ‘initialize’ routine.
t.tex_preamble = t.tex_preamble + "\n\t\\usepackage{marvosym}\n"
562 563 |
# File 'lib/Tioga/Page_Frame_Bounds.rb', line 562 def tex_preamble end |