Class: CTioga::Themes::DemoTheme

Inherits:
ClassicalTheme show all
Defined in:
lib/CTioga/themes/demo.rb

Constant Summary

Constants inherited from BaseTheme

BaseTheme::THEMES

Instance Attribute Summary

Attributes inherited from ClassicalTheme

#sets

Instance Method Summary collapse

Methods inherited from ClassicalTheme

#choose_set, #next_curve_style

Methods inherited from BaseTheme

#choose_set, inherited, #next_curve_style

Constructor Details

#initializeDemoTheme

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

tioga.rubyforge.org/doc/

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_argsObject

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