~ubuntu-branches/ubuntu/utopic/python-chaco/utopic

« back to all changes in this revision

Viewing changes to enthought/chaco/errorbar_plot.py

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2011-04-06 19:03:54 UTC
  • mfrom: (7.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110406190354-rwd55l2ezjecfo41
Tags: 3.4.0-2
d/rules: fix pyshared directory path (Closes: #621116)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
 
2
from __future__ import with_statement
 
3
 
2
4
# Major library imports
3
5
from numpy import column_stack, compress, invert, isnan, transpose
4
6
import logging
97
99
        if not icon_mode:
98
100
            gc.clip_to_rect(self.x, self.y, self.width, self.height)
99
101
 
100
 
        gc.save_state()
101
 
        gc.set_antialias(False)
102
 
 
103
 
        try:
 
102
        with gc:
 
103
            gc.set_antialias(False)
104
104
            gc.set_stroke_color(self.color_)
105
105
            gc.set_line_width(self.line_width)
106
106
            gc.set_line_dash(self.line_style_)
126
126
            else:
127
127
                gc.stroke_path()
128
128
 
129
 
        finally:
130
 
            gc.restore_state()
131
 
 
132
129
        if not icon_mode:
133
130
            self._draw_default_axes(gc)
134
131
        return