~ubuntu-branches/ubuntu/wily/ctioga2/wily

« back to all changes in this revision

Viewing changes to lib/ctioga2/graphics/elements/subplot.rb

  • Committer: Package Import Robot
  • Author(s): Vincent Fourmond
  • Date: 2013-07-08 20:58:17 UTC
  • mfrom: (6.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130708205817-cephnc6etndyxrrp
Tags: 0.4-2
* Upload to unstable
* Already conforms to newer standards

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
module CTioga2
18
18
 
19
 
  Version::register_svn_info('$Revision: 285 $', '$Date: 2011-02-22 21:12:47 +0100 (Tue, 22 Feb 2011) $')
 
19
  Version::register_svn_info('$Revision: 329 $', '$Date: 2012-12-11 00:13:17 +0100 (Tue, 11 Dec 2012) $')
20
20
 
21
21
  module Graphics
22
22
 
103
103
        # Makes up a Boundaries object from two axes keys
104
104
        def get_given_boundaries(horiz, vert)
105
105
          if @computed_boundaries
106
 
            return Types::Boundaries.from_ranges(@computed_boundaries[horiz],
107
 
                                                 @computed_boundaries[vert])
 
106
            if @computed_boundaries.key?(horiz) and 
 
107
                @computed_boundaries.key?(vert)
 
108
              return Types::Boundaries.from_ranges(@computed_boundaries[horiz],
 
109
                                                   @computed_boundaries[vert])
 
110
            else
 
111
              error { "A subplot element doesn't have inner bounds -- which probably means that no curves were defined" }
 
112
              return Types::Boundaries.new(0.0,1.0,0.0,1.0)
 
113
            end
108
114
          else
109
115
            return nil
110
116
          end