当前位置: 首页>>代码示例>>Python>>正文


Python Axes.set_axis_off方法代码示例

本文整理汇总了Python中matplotlib.axes.Axes.set_axis_off方法的典型用法代码示例。如果您正苦于以下问题:Python Axes.set_axis_off方法的具体用法?Python Axes.set_axis_off怎么用?Python Axes.set_axis_off使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在matplotlib.axes.Axes的用法示例。


在下文中一共展示了Axes.set_axis_off方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: TelescopeEventView

# 需要导入模块: from matplotlib.axes import Axes [as 别名]
# 或者: from matplotlib.axes.Axes import set_axis_off [as 别名]
class TelescopeEventView(tk.Frame, object):
    """ A frame showing the camera view of a single telescope """

    def __init__(self, root, telescope, data=None, *args, **kwargs):
        self.telescope = telescope
        super(TelescopeEventView, self).__init__(root)
        self.figure = Figure(figsize=(5, 5), facecolor='none')
        self.ax = Axes(self.figure, [0, 0, 1, 1], aspect=1)
        self.ax.set_axis_off()
        self.figure.add_axes(self.ax)
        self.camera_plot = CameraPlot(telescope, self.ax, data, *args, **kwargs)
        self.canvas = FigureCanvasTkAgg(self.figure, master=self)
        self.canvas.show()
        self.canvas.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH, expand=True)
        self.canvas._tkcanvas.pack(side=tk.BOTTOM, fill=tk.BOTH, expand=True)
        self.canvas._tkcanvas.config(highlightthickness=0)

    @property
    def data(self):
        return self.camera_plot.data

    @data.setter
    def data(self, value):
        self.camera_plot.data = value
        self.canvas.draw()
开发者ID:MaxNoe,项目名称:cta_event_viewer,代码行数:27,代码来源:__init__.py

示例2: fibers_2d_xy

# 需要导入模块: from matplotlib.axes import Axes [as 别名]
# 或者: from matplotlib.axes.Axes import set_axis_off [as 别名]
def fibers_2d_xy():
    '''
        Plot fibers in 2D section (plane XY)
    '''
    fig3 = figure(5)
    ax3 = Axes(fig3, [.1, .1, .8, .8])

    fig3.add_axes(ax3)
    for i in range(0, len(sx[0])):
        l = Line2D([sx[0][i] - fib.lf / 2. * cos(phi_x[0][i]), sx[0][i] + fib.lf / 2. * cos(phi_x[0][i])], \
                     [sy[0][i] - fib.lf / 2. * cos(phi_y[0][i]), sy[0][i] + fib.lf / 2. * cos(phi_y[0][i])], \
                      linewidth = .5, color = 'black')
        #print  i, sx[0][i], lf / 2. * cosphi_x[0][i], [sx[0][i] - lf / 2. * cosphi_x[0][i], sx[0][i] + lf / 2. * cosphi_x[0][i]], \
        #             [sy[0][i] - lf / 2. * cosphi_y[0][i], sy[0][i] + lf / 2. * cosphi_y[0][i]], \
        #              [sz[0][i] - lf / 2. * cosphi_z[0][i], sz[0][i] + lf / 2. * cosphi_z[0][i]]                    
        ax3.add_line(l)
    ax3.plot(sx, sy, 'ko', markersize = 3.0)
    ax3.plot([ -spec.l_x / 2., spec.l_x / 2. ], [spec.l_y / 2., spec.l_y / 2.], 'k-', linewidth = 2)
    ax3.plot([ -spec.l_x / 2., spec.l_x / 2. ], [-spec.l_y / 2., -spec.l_y / 2.], 'k-', linewidth = 2)
    ax3.plot([ spec.l_x / 2., spec.l_x / 2. ], [-spec.l_y / 2., spec.l_y / 2.], 'k-', linewidth = 2)
    ax3.plot([ -spec.l_x / 2., -spec.l_x / 2. ], [-spec.l_y / 2., spec.l_y / 2.], 'k-', linewidth = 2)
    ax3.set_axis_off()
    #ax3.set_xlim( -l_x / 2., l_x / 2. )
    #ax3.set_ylim( -l_y / 2., l_y / 2. )
    title('Fibers in 2D - xy')
    draw()
开发者ID:kelidas,项目名称:scratch,代码行数:28,代码来源:specimen3D_fibers.py

示例3: __init__

# 需要导入模块: from matplotlib.axes import Axes [as 别名]
# 或者: from matplotlib.axes.Axes import set_axis_off [as 别名]
    def __init__(self, fig, rect=None, *args, **kwargs):
        '''
        Build an :class:`Axes3D` instance in
        :class:`~matplotlib.figure.Figure` *fig* with
        *rect=[left, bottom, width, height]* in
        :class:`~matplotlib.figure.Figure` coordinates

        Optional keyword arguments:

          ================   =========================================
          Keyword            Description
          ================   =========================================
          *azim*             Azimuthal viewing angle (default -60)
          *elev*             Elevation viewing angle (default 30)
          ================   =========================================
        '''

        if rect is None:
            rect = [0.0, 0.0, 1.0, 1.0]
        self._cids = []

        self.initial_azim = kwargs.pop('azim', -60)
        self.initial_elev = kwargs.pop('elev', 30)

        self.xy_viewLim = unit_bbox()
        self.zz_viewLim = unit_bbox()
        self.xy_dataLim = unit_bbox()
        self.zz_dataLim = unit_bbox()
        # inihibit autoscale_view until the axes are defined
        # they can't be defined until Axes.__init__ has been called
        self.view_init(self.initial_elev, self.initial_azim)
        self._ready = 0

        Axes.__init__(self, fig, rect,
                      frameon=True,
                      *args, **kwargs)
        # Disable drawing of axes by base class
        Axes.set_axis_off(self)
        self._axis3don = True
        self.M = None

        self._ready = 1
        self.mouse_init()
        self.set_top_view()

        self.axesPatch.set_linewidth(0)
        self.figure.add_axes(self)
开发者ID:CTPUG,项目名称:matplotlib,代码行数:49,代码来源:axes3d.py

示例4: display_image

# 需要导入模块: from matplotlib.axes import Axes [as 别名]
# 或者: from matplotlib.axes.Axes import set_axis_off [as 别名]
 def display_image(self):
 
     # plot and save the image
     img = self.compute_image()
     
     # clear previous figure
     self.fig.clf()
     # setup plot 
     ax = Axes(self.fig, [0, 0, 1, 1]) # remove outer border  
     ax.set_axis_off()                 # disable axis
     ax.set_xlim((self.xmin, self.xmax))
     ax.set_ylim((self.ymin, self.ymax))
     ax.set_xticklabels([])
     ax.set_yticklabels([])
     ax.imshow(img, cmap=pl.get_cmap(self.cmap), interpolation='nearest', 
               extent=[self.xmin, self.xmax, self.ymin, self.ymax],
               origin='upper', aspect=1.0)
               
     self.fig.add_axes(ax)
开发者ID:TarasKuzyo,项目名称:python-fractals,代码行数:21,代码来源:julia-fractal.py


注:本文中的matplotlib.axes.Axes.set_axis_off方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。