Top Level Namespace
- Includes:
- Cosmos::Script, Math
Defined Under Namespace
Modules: Cosmos, CosmosIO, Enumerable, Kernel, Math, ObjectSpace, QDA, Qt, SNMP Classes: Array, Class, Date, DateTime, Exception, FalseClass, File, Hash, HazardousError, IO, Matrix, NilClass, Numeric, Object, Range, Regexp, RubyLex, RubyLexUtils, Socket, String, StringIO, Struct, Symbol, Time, TrueClass
Constant Summary collapse
- COSMOS_VERSION =
'3.1.1'
Constants included from Cosmos::Script
Cosmos::Script::DEFAULT_TLM_POLLING_RATE
Constants included from Cosmos::Extract
Cosmos::Extract::SCANNING_REGULAR_EXPRESSION
Instance Method Summary collapse
Methods included from Math
#cos_squared, #luma_from_rgb_max_255, #sin_squared, #stddev_population, #stddev_sample, #variance_population, #variance_sample
Instance Method Details
#gem_installed?(name, version = Gem::Requirement.default) ⇒ Boolean
17 18 19 20 |
# File 'ext/mkrf_conf.rb', line 17 def gem_installed?(name, version = Gem::Requirement.default) version = Gem::Requirement.create version unless version.is_a? Gem::Requirement Gem::Specification.each.any? { |spec| name == spec.name and version.satisfied_by? spec.version } end |
#plot(x, y1, y2 = nil) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/cosmos/gui/line_graph/line_graph_script.rb', line 15 def plot(x, y1, y2 = nil) Qt.execute_in_main_thread do a = Cosmos::LineGraphDialog.new('Graph') a.line_graph.add_line('Data 1', y1, x, nil, nil, nil, nil, 'red') if y2 a.line_graph.add_line('Data 2', y2, x, nil, nil, nil, nil, 'blue') end a.raise a.exec a.dispose end end |