Class: Tioga::Titles_and_Labels
- Inherits:
-
Object
- Object
- Tioga::Titles_and_Labels
- Defined in:
- lib/Tioga/Titles_and_Labels.rb
Overview
These are the methods and attributes for doing plot titles and axis labels.
Instance Method Summary collapse
-
#do_box_labels(title, xlabel, ylabel) ⇒ Object
Each argument, if it is not
nil
, is shown (using show_title, show_xlabel, or show_ylabel) and it’s “visible” flag is setfalse
to stop any later attempts to “reshow” it. -
#show_title(text = nil) ⇒ Object
If the text argument is
nil
, then the current #title attribute is used instead. -
#show_xlabel(text = nil) ⇒ Object
If the text argument is
nil
, then the current #xlabel attribute is used instead. -
#show_ylabel(text = nil) ⇒ Object
If the text argument is
nil
, then the current #ylabel attribute is used instead. -
#title ⇒ Object
:call-seq: title title = text_or_nil.
-
#title_alignment ⇒ Object
:call-seq: title_alignment ylabel_alignment = an_alignment.
-
#title_angle ⇒ Object
:call-seq: title_angle title_angle = a_float.
-
#title_color ⇒ Object
:call-seq: title_color title_color = a_color_or_nil.
-
#title_justification ⇒ Object
:call-seq: title_justification title_justification = a_justification.
-
#title_position ⇒ Object
:call-seq: title_position title_position = a_float.
-
#title_scale ⇒ Object
:call-seq: title_scale title_scale = a_float.
-
#title_shift ⇒ Object
:call-seq: title_shift title_shift = a_float.
-
#title_side ⇒ Object
:call-seq: title_side title_side = a_side.
-
#title_visible ⇒ Object
:call-seq: title_visible title_visible = false.
-
#xlabel ⇒ Object
:call-seq: xlabel xlabel = text_or_nil.
-
#xlabel_alignment ⇒ Object
:call-seq: xlabel_alignment xlabel_alignment = an_alignment.
-
#xlabel_angle ⇒ Object
:call-seq: xlabel_angle xlabel_angle = a_float.
-
#xlabel_color ⇒ Object
:call-seq: xlabel_color xlabel_color = a_color_or_nil.
-
#xlabel_justification ⇒ Object
:call-seq: xlabel_justification xlabel_justification = a_justification.
-
#xlabel_position ⇒ Object
:call-seq: xlabel_position xlabel_position = a_float.
-
#xlabel_scale ⇒ Object
:call-seq: xlabel_scale xlabel_scale = a_float.
-
#xlabel_shift ⇒ Object
:call-seq: xlabel_shift xlabel_shift = a_float.
-
#xlabel_side ⇒ Object
:call-seq: xlabel_side xlabel_side = a_side.
-
#xlabel_visible ⇒ Object
:call-seq: xlabel_visible xlabel_visible = false.
-
#ylabel ⇒ Object
:call-seq: ylabel ylabel = text_or_nil.
-
#ylabel_alignment ⇒ Object
:call-seq: ylabel_alignment ylabel_alignment = an_alignment.
-
#ylabel_angle ⇒ Object
:call-seq: ylabel_angle ylabel_angle = a_float.
-
#ylabel_color ⇒ Object
:call-seq: ylabel_color ylabel_color = a_color_or_nil.
-
#ylabel_justification ⇒ Object
:call-seq: ylabel_justification ylabel_justification = a_justification.
-
#ylabel_position ⇒ Object
:call-seq: ylabel_position ylabel_position = a_float.
-
#ylabel_scale ⇒ Object
:call-seq: ylabel_scale ylabel_scale = a_float.
-
#ylabel_shift ⇒ Object
:call-seq: ylabel_shift ylabel_shift = a_float.
-
#ylabel_side ⇒ Object
:call-seq: ylabel_side ylabel_side = a_side.
-
#ylabel_visible ⇒ Object
:call-seq: ylabel_visible ylabel_visible = false.
Instance Method Details
#do_box_labels(title, xlabel, ylabel) ⇒ Object
Each argument, if it is not nil
, is shown (using show_title, show_xlabel, or show_ylabel) and it’s “visible” flag is set false
to stop any later attempts to “reshow” it.
32 33 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 32 def do_box_labels(title, xlabel, ylabel) end |
#show_title(text = nil) ⇒ Object
If the text argument is nil
, then the current #title attribute is used instead. If the flag title_visible is true
and the text is not nil
, then calls show_text with the text and the attributes controlling the appearance of the title (title_scale, title_shift, etc.).
13 14 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 13 def show_title(text = nil) end |
#show_xlabel(text = nil) ⇒ Object
If the text argument is nil
, then the current #xlabel attribute is used instead. If the flag xlabel_visible is true
and the text is not nil
, then calls show_text with the text and the attributes controlling the appearance of the x label (xlabel_position, xlabel_scale, etc.).
20 21 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 20 def show_xlabel(text = nil) end |
#show_ylabel(text = nil) ⇒ Object
If the text argument is nil
, then the current #ylabel attribute is used instead. If the flag ylabel_visible is true
and the text is not nil
, then calls show_text with the text and the attributes controlling the appearance of the y label (ylabel_position, ylabel_scale, etc.).
27 28 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 27 def show_ylabel(text = nil) end |
#title ⇒ Object
:call-seq:
title
title = text_or_nil
The text to be used for the title, or nil
indicating no title.
283 284 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 283 def title end |
#title_alignment ⇒ Object
:call-seq:
title_alignment
ylabel_alignment = an_alignment
Defines the alignment for the title (default is ALIGNED_AT_BASELINE
).
136 137 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 136 def title_alignment end |
#title_angle ⇒ Object
:call-seq:
title_angle
title_angle = a_float
The angle of the baseline for the title with respect to the side of the frame (default is 0).
208 209 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 208 def title_angle end |
#title_color ⇒ Object
:call-seq:
title_color
title_color = a_color_or_nil
If not nil
, then is used to add a TeX “textcolor” specification to the title text.
184 185 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 184 def title_color end |
#title_justification ⇒ Object
:call-seq:
title_justification
title_justification = a_justification
Defines the justification for the title (default is CENTERED
).
160 161 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 160 def title_justification end |
#title_position ⇒ Object
:call-seq:
title_position
title_position = a_float
The fractional position along the edge of the frame for the title reference point. The default title_position is 0.5 with title_justification == CENTERED
.
257 258 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 257 def title_position end |
#title_scale ⇒ Object
:call-seq:
title_scale
title_scale = a_float
Defines the text size scale for the title (default is 1.1).
112 113 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 112 def title_scale end |
#title_shift ⇒ Object
:call-seq:
title_shift
title_shift = a_float
Defines the shift distance away from the frame edge for the reference point of the title measured in units of text heights (default title_shift is 0.7).
86 87 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 86 def title_shift end |
#title_side ⇒ Object
:call-seq:
title_side
title_side = a_side
The side of the frame for the title (default is TOP
).
232 233 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 232 def title_side end |
#title_visible ⇒ Object
:call-seq:
title_visible
title_visible = false
If true
, then it is okay for tioga to show the title of a plot. If false
, then calls on show_title return immediately. This attribute is “one-way-only” in that it starts true
and can be set false
, but cannot be reset to true
except by restoring the graphics state in which is was still true
. This is intended to help control the behavior of plots when embedded as subplots in a larger configuration. Note that this does not effect calls on show_text; it only applies to calls on show_title.
47 48 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 47 def title_visible end |
#xlabel ⇒ Object
:call-seq:
xlabel
xlabel = text_or_nil
The text to be used for the x axis label, or nil
indicating no label.
291 292 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 291 def xlabel end |
#xlabel_alignment ⇒ Object
:call-seq:
xlabel_alignment
xlabel_alignment = an_alignment
Defines the alignment for the x label (default is ALIGNED_AT_BASELINE
).
144 145 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 144 def xlabel_alignment end |
#xlabel_angle ⇒ Object
:call-seq:
xlabel_angle
xlabel_angle = a_float
The angle of the baseline for the x label with respect to the side of the frame (default is 0).
216 217 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 216 def xlabel_angle end |
#xlabel_color ⇒ Object
:call-seq:
xlabel_color
xlabel_color = a_color_or_nil
If not nil
, then is used to add a TeX “textcolor” specification to the x label text.
192 193 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 192 def xlabel_color end |
#xlabel_justification ⇒ Object
:call-seq:
xlabel_justification
xlabel_justification = a_justification
Defines the justification for the x label (default is CENTERED
).
168 169 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 168 def xlabel_justification end |
#xlabel_position ⇒ Object
:call-seq:
xlabel_position
xlabel_position = a_float
The fractional position along the edge of the frame for the x label reference point. The default xlabel_position is 0.5 with xlabel_justification == CENTERED
.
266 267 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 266 def xlabel_position end |
#xlabel_scale ⇒ Object
:call-seq:
xlabel_scale
xlabel_scale = a_float
Defines the text size scale for the x label (default is 1.0).
120 121 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 120 def xlabel_scale end |
#xlabel_shift ⇒ Object
:call-seq:
xlabel_shift
xlabel_shift = a_float
Defines the shift distance away from the frame edge for the reference point of the x label measured in units of text heights (default xlabel_shift is 1.0).
95 96 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 95 def xlabel_shift end |
#xlabel_side ⇒ Object
:call-seq:
xlabel_side
xlabel_side = a_side
The side of the frame for the x label (default is BOTTOM
).
240 241 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 240 def xlabel_side end |
#xlabel_visible ⇒ Object
:call-seq:
xlabel_visible
xlabel_visible = false
If true
, then it is okay for tioga to show the x label of a plot. If false
, then calls on show_xlabel return immediately. This attribute is “one-way-only” in that it starts true
and can be set false
, but cannot be reset to true
except by restoring the graphics state in which is was still true
. This is intended to help control the behavior of plots when embedded as subplots in a larger configuration. Note that this does not effect calls on show_text; it only applies to calls on show_xlabel.
62 63 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 62 def xlabel_visible end |
#ylabel ⇒ Object
:call-seq:
ylabel
ylabel = text_or_nil
The text to be used for the y axis label, or nil
indicating no label.
299 300 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 299 def ylabel end |
#ylabel_alignment ⇒ Object
:call-seq:
ylabel_alignment
ylabel_alignment = an_alignment
Defines the alignment for the y label (default is ALIGNED_AT_BASELINE
).
152 153 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 152 def ylabel_alignment end |
#ylabel_angle ⇒ Object
:call-seq:
ylabel_angle
ylabel_angle = a_float
The angle of the baseline for the y label with respect to the side of the frame (default is 0).
224 225 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 224 def ylabel_angle end |
#ylabel_color ⇒ Object
:call-seq:
ylabel_color
ylabel_color = a_color_or_nil
If not nil
, then is used to add a TeX “textcolor” specification to the y label text.
200 201 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 200 def ylabel_color end |
#ylabel_justification ⇒ Object
:call-seq:
ylabel_justification
ylabel_justification = a_justification
Defines the justification for the y label (default is CENTERED
).
176 177 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 176 def ylabel_justification end |
#ylabel_position ⇒ Object
:call-seq:
ylabel_position
ylabel_position = a_float
The fractional position along the edge of the frame for the y label reference point. The default ylabel_position is 0.5 with ylabel_justification == CENTERED
.
275 276 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 275 def ylabel_position end |
#ylabel_scale ⇒ Object
:call-seq:
ylabel_scale
ylabel_scale = a_float
Defines the text size scale for the y label (default is 1.0).
128 129 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 128 def ylabel_scale end |
#ylabel_shift ⇒ Object
:call-seq:
ylabel_shift
ylabel_shift = a_float
Defines the shift distance away from the frame edge for the reference point of the y label measured in units of text heights (default ylabel_shift is 1.8).
104 105 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 104 def ylabel_shift end |
#ylabel_side ⇒ Object
:call-seq:
ylabel_side
ylabel_side = a_side
The side of the frame for the y label (default is LEFT
).
248 249 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 248 def ylabel_side end |
#ylabel_visible ⇒ Object
:call-seq:
ylabel_visible
ylabel_visible = false
If true
, then it is okay for tioga to show the y label of a plot. If false
, then calls on show_ylabel return immediately. This attribute is “one-way-only” in that it starts true
and can be set false
, but cannot be reset to true
except by restoring the graphics state in which is was still true
. This is intended to help control the behavior of plots when embedded as subplots in a larger configuration. Note that this does not effect calls on show_text; it only applies to calls on show_ylabel.
77 78 |
# File 'lib/Tioga/Titles_and_Labels.rb', line 77 def ylabel_visible end |