Module: CodeRunner::Trinity::TrinityMultiKits

Included in:
CodeRunner::Trinity
Defined in:
lib/trinitycrmod/graphs.rb

Instance Method Summary collapse

Instance Method Details

#profiles_graphkit(options) ⇒ Object



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/trinitycrmod/graphs.rb', line 100

def profiles_graphkit(options)
  kit = GraphKit::MultiKit.new(
    [
      ion_temp_prof_graphkit(options),
      eln_temp_prof_graphkit(options),
      dens_prof_graphkit(options),
      ang_mom_prof_graphkit(options)
  ]
  )
  kit.each{|k| k.title = nil}
  if options[:horizontal]
    kit.slice(0..2).each{|k| k.xlabel = nil; k.gp.xtics = "format ''"}
    kit[3].gp.xtics = 'format "%2.1f"'
  else
    kit.values_at(0,2).each{|k| k.xlabel = nil; k.gp.xtics = "format ''"}
    kit.gp.multiplot = "layout 2,2"
    kit.gp.key = "tmargin"
  end
  kit

end