Class: CTioga::Themes::DemoTheme
- Inherits:
-
ClassicalTheme
- Object
- BaseTheme
- ClassicalTheme
- CTioga::Themes::DemoTheme
- Defined in:
- lib/CTioga/themes/demo.rb
Constant Summary
Constants inherited from BaseTheme
Instance Attribute Summary
Attributes inherited from ClassicalTheme
Instance Method Summary collapse
-
#bod_hook(t) ⇒ Object
To understand the following code, I can only encourage you to have a look at Tioga’s rdoc documentation, which can be generated on your tioga source tree or browsed online at.
-
#cmdline_extra_args ⇒ Object
This function pushes back some arguments to the command line.
-
#initialize ⇒ DemoTheme
constructor
A new instance of DemoTheme.
Methods inherited from ClassicalTheme
#choose_set, #next_curve_style
Methods inherited from BaseTheme
#choose_set, inherited, #next_curve_style
Constructor Details
#initialize ⇒ DemoTheme
Returns a new instance of DemoTheme.
33 34 35 |
# File 'lib/CTioga/themes/demo.rb', line 33 def initialize super # We don't want to use more for now end |
Instance Method Details
#bod_hook(t) ⇒ Object
To understand the following code, I can only encourage you to have a look at Tioga’s rdoc documentation, which can be generated on your tioga source tree or browsed online at
The t argument is a Tioga::FigureMaker object that is in charge of actually drawing the plots.
46 47 48 49 50 |
# File 'lib/CTioga/themes/demo.rb', line 46 def bod_hook(t) t.tex_fontfamily = 'sfdefault' # Sans serif fonts t.tex_xaxis_numeric_label = '$x = #1$' t.tex_yaxis_numeric_label = '$y = #1$' end |
#cmdline_extra_args ⇒ Object
This function pushes back some arguments to the command line. No further processing happens, so you need to make sure that you did correct splitting:
- ‘–marker auto’
-
is wrong: use [‘–marker’, ‘auto’] instead.
56 57 58 |
# File 'lib/CTioga/themes/demo.rb', line 56 def cmdline_extra_args return ["--background", "Cornsilk"] end |