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


Python spines.Spine类代码示例

本文整理汇总了Python中matplotlib.spines.Spine的典型用法代码示例。如果您正苦于以下问题:Python Spine类的具体用法?Python Spine怎么用?Python Spine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: reset

    def reset(self):
        """Initialize or Reset"""
        # delete references to previous annotations
        for obj in self.annotations.values():
            obj.remove()

        spine_pos = self.data_xoffset * self.spine_xoffset

        for chan in range(self.b.n_chans):
            # add spines for channel unit bars
            sp = Spine(self.b.axes, 'left', self.b.axes.spines['left']._path)
            sp.set_position(('axes', spine_pos))
            self.b.axes.spines['ch%s' % chan] = sp

            # add channel names
            self.annotations['ch%s' % chan] = self.b.axes.text(
                    0, 0,  # dummy location
                    'Ch%s' % chan,
                    ha='center',
                    va='center',
                    rotation='vertical')

        # hide unneeded spines and move ticks
        self.b.axes.spines['left'].set_color('none')
        self.b.axes.spines['right'].set_color('none')
        self.b.axes.spines['left'].set_position(('axes', spine_pos))
开发者ID:btel,项目名称:SpikeSort,代码行数:26,代码来源:spike_browser.py

示例2: _gen_axes_spines

 def _gen_axes_spines(self):
     spine_type = 'circle'
     verts = unit_poly_verts(theta)
     verts.append(verts[0])
     path = Path(verts)
     spine = Spine(self, spine_type, path)
     spine.set_transform(self.transAxes)
     return {'polar': spine}
开发者ID:aczapata,项目名称:twitter_elections_deploy,代码行数:8,代码来源:radar.py

示例3: _gen_axes_spines

 def _gen_axes_spines(self):
     if self.radar_patch_type == 'circle':
         return PolarAxes._gen_axes_spines(self)
     # The following is a hack to get the spines (i.e. the axes frame)
     # to draw correctly for a polygon frame.
     spine_type = 'circle'
     verts = unit_poly_verts(self.radar_theta)
     # close off polygon by repeating first vertex
     verts.append(verts[0])
     path = Path(verts)
     spine = Spine(self, self.radar_spine_type, path)
     spine.set_transform(self.transAxes)
     return {'polar': spine}
开发者ID:moonbury,项目名称:pythonanywhere,代码行数:13,代码来源:radar.py

示例4: _gen_axes_spines

 def _gen_axes_spines(self):
     if frame == 'circle':
         return super()._gen_axes_spines()
     elif frame == 'polygon':
         # spine_type must be 'left'/'right'/'top'/'bottom'/'circle'.
         spine = Spine(axes=self,
                       spine_type='circle',
                       path=Path.unit_regular_polygon(num_vars))
         # unit_regular_polygon gives a polygon of radius 1 centered at
         # (0, 0) but we want a polygon of radius 0.5 centered at (0.5,
         # 0.5) in axes coordinates.
         spine.set_transform(Affine2D().scale(.5).translate(.5, .5)
                             + self.transAxes)
         return {'polar': spine}
     else:
         raise ValueError("unknown value for 'frame': %s" % frame)
开发者ID:ianthomas23,项目名称:matplotlib,代码行数:16,代码来源:radar_chart.py

示例5: _gen_axes_spines

 def _gen_axes_spines(self, locations=None, offset=0.0, units='inches'):
     return {SmithAxes.name: Spine.circular_spine(self, (0.5, 0.5), self._get_key("axes.radius"))}
开发者ID:openchip,项目名称:red-pitaya-notes,代码行数:2,代码来源:smithaxes.py

示例6: _gen_axes_spines

 def _gen_axes_spines(self):
     if frame == 'circle':
         return PolarAxes._gen_axes_spines(self)
     # The following is a hack to get the spines (i.e. the axes frame)
     # to draw correctly for a polygon frame.
     # spine_type must be 'left', 'right', 'top', 'bottom', or `circle`.
     spine_type = 'circle'
     verts = unit_poly_verts(theta)
     # close off polygon by repeating first vertex
     verts.append(verts[0])
     path = Path(verts)
     spine = Spine(self, spine_type, path)
     spine.set_transform(self.transAxes)
     return {'polar': spine}
开发者ID:jorgeop27,项目名称:geospatial_analysis_toolbox,代码行数:14,代码来源:heterogeneity_index2.py


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