~ubuntu-branches/ubuntu/oneiric/guiqwt/oneiric

« back to all changes in this revision

Viewing changes to guiqwt/curve.py

  • Committer: Bazaar Package Importer
  • Author(s): Picca Frédéric-Emmanuel
  • Date: 2011-05-06 14:24:18 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110506142418-y6rlxuod7e52jfdr
Tags: 2.1.3-1
* Imported Upstream version 2.1.3
* debian/control
  - remove the Depends: python-qscintilla2 (useless now)
  - add Suggests: spyder as recommended by the upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
456
456
 
457
457
    def get_coordinates_label(self, xc, yc):
458
458
        title = self.title().text()
459
 
        return "%s:<br>x = %f<br>y = %f" % (title, xc, yc)
 
459
        return "%s:<br>x = %g<br>y = %g" % (title, xc, yc)
460
460
 
461
461
    def get_closest_x(self, xc):
462
462
        # We assume X is sorted, otherwise we'd need :
1046
1046
        item = self.get_last_active_item(ITrackableItemType)
1047
1047
        if item:
1048
1048
            return item.get_coordinates_label(x, y)
1049
 
        return "<b>%s</b><br>x = %f<br>y = %f" % (title, x, y)
 
1049
        return "<b>%s</b><br>x = %g<br>y = %g" % (title, x, y)
1050
1050
 
1051
1051
    def set_marker_axes(self):
1052
1052
        curve = self.get_last_active_item(ITrackableItemType)