Skip to content

Commit 8c6fc0b

Browse files
committed
Adding gouraud plots to the Mac OS X native backend.
svn path=/trunk/matplotlib/; revision=8710
1 parent 6e7f26f commit 8c6fc0b

File tree

2 files changed

+356
-7
lines changed

2 files changed

+356
-7
lines changed

lib/matplotlib/backends/backend_macosx.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from matplotlib.colors import colorConverter
1616

1717

18-
1918
from matplotlib.widgets import SubplotTool
2019

2120
import matplotlib
@@ -104,6 +103,10 @@ def new_gc(self):
104103
self.gc.set_hatch(None)
105104
return self.gc
106105

106+
def draw_gouraud_triangle(self, gc, points, colors, transform):
107+
points = transform.transform(points)
108+
gc.draw_gouraud_triangle(points, colors)
109+
107110
def draw_image(self, gc, x, y, im):
108111
im.flipud_out()
109112
nrows, ncols, data = im.as_rgba_str()
@@ -228,7 +231,7 @@ def new_figure_manager(num, *args, **kwargs):
228231
"""
229232
Create a new figure manager instance
230233
"""
231-
if not _macosx.get_main_display_id():
234+
if not _macosx.verify_main_display():
232235
import warnings
233236
warnings.warn("Python is not installed as a framework. The MacOSX backend may not work correctly if Python is not installed as a framework. Please see the Python documentation for more information on installing Python as a framework on Mac OS X")
234237
FigureClass = kwargs.pop('FigureClass', Figure)

0 commit comments

Comments
 (0)