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


Python Graph.set_y_title方法代码示例

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


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

示例1: __init__

# 需要导入模块: from pychron.graph.graph import Graph [as 别名]
# 或者: from pychron.graph.graph.Graph import set_y_title [as 别名]
    def __init__(self, *args, **kw):
        super(Scanner, self).__init__(*args, **kw)
        graph = Graph()
        self.graph = graph

        p = graph.new_plot(padding_top=30, padding_right=10)

        self._add_bounds(p)
        self._add_mftable_overlay(p)
        self._add_limit_tool(p)
        p.index_range.on_trait_change(self._handle_xbounds_change, 'updated')
        # graph.set_x_limits(self.min_dac, self.max_dac)
        graph.new_series()
        graph.set_x_title('Magnet DAC (Voltage)')
        graph.set_y_title('Intensity')

        self._use_mftable_limits_fired()
开发者ID:OSUPychron,项目名称:pychron,代码行数:19,代码来源:scanner.py

示例2: dict

# 需要导入模块: from pychron.graph.graph import Graph [as 别名]
# 或者: from pychron.graph.graph.Graph import set_y_title [as 别名]
        #            g.set_series_label('{} (ns)'.format(tau), plotid=1, series=i)


        #    g.plots[1].legend.plots = dict([(k, v[0]) for k, v in g.plots[1].plots.iteritems()])
        #    print g.plots[1].legend.plots
    g.new_series(taus, mswds1, plotid=0, type='line_scatter')
    g.set_y_limits(min(mswds1) - 5, max(mswds1) + 5, plotid=0)

    # fit parabola and find minimum.
    coeffs1 = polyfit(taus, mswds1, 2)
    # min at dy=0   (ax2+bx+c)dx=dy==2ax+b
    # 2ax+b=0 , x=-b/(2a)
    dt = -coeffs1[1] / (2 * coeffs1[0])
    print 'dead time1= ', dt

    g.set_x_title('# Airshots', plotid=1)
    g.set_x_title('Dead Time (ns)', plotid=0)

    g.set_y_title('40Ar/36Ar', plotid=1)
    g.set_y_title('MSWD', plotid=0)

    g.add_vertical_rule(dt)
    #    g.add_plot_label('dead time (ns)= {:0.2f}'.format(dt), 235, 100)
    #    g.add_data_label('dead time (ns)= {:0.2f}'.format(dt), dt, 30, plotid=0)
    g.add_data_label(dt, polyval(coeffs1, dt), plotid=0)

    #    g.set_series_label('{} (ns)'.format(tau), plotid=1, series=0)
    g.configure_traits()

#======== EOF ================================
开发者ID:UManPychron,项目名称:pychron,代码行数:32,代码来源:dead_time.py


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