コード例 #1
0
ファイル: ellipseartist.py プロジェクト: yishizu/compas
 def draw(self):
     ellipse = EllipsePatch(self.ellipse.center[:2],
                            width=2 * self.ellipse.major,
                            height=2 * self.ellipse.minor,
                            facecolor=self.facecolor,
                            edgecolor=self.edgecolor,
                            fill=self.fill,
                            zorder=self.zorder)
     self._mpl_ellipse = self.plotter.axes.add_artist(ellipse)
コード例 #2
0
ファイル: ellipse.py プロジェクト: aaronmorgenegg/cs5700
 def draw(self, graphics):
     center = (self.center.x, self.center.y)
     width = self.axis1.computeLength()
     height = self.axis2.computeLength()
     ellipse = EllipsePatch(xy=center,
                            width=width,
                            height=height,
                            fill=None,
                            color='k')
     graphics.gca().add_patch(ellipse)
     graphics.axis('scaled')
コード例 #3
0
    def draw(self) -> None:
        """Draw the ellipse on the plotter canvas.

        Returns
        -------
        None

        """
        ellipse = EllipsePatch(self.ellipse.center[:2],
                               width=2 * self.ellipse.major,
                               height=2 * self.ellipse.minor,
                               facecolor=self.facecolor,
                               edgecolor=self.edgecolor,
                               fill=self.fill,
                               alpha=self.alpha,
                               zorder=self.zorder)
        self._mpl_ellipse = self.plotter.axes.add_artist(ellipse)