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


Python lines.TICKRIGHT属性代码示例

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


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

示例1: apply_tickdir

# 需要导入模块: from matplotlib import lines [as 别名]
# 或者: from matplotlib.lines import TICKRIGHT [as 别名]
def apply_tickdir(self, tickdir):
        if tickdir is None:
            tickdir = rcParams['%s.direction' % self._name]
        self._tickdir = tickdir

        if self._tickdir == 'in':
            self._tickmarkers = (mlines.TICKRIGHT, mlines.TICKLEFT)
            self._pad = self._base_pad
        elif self._tickdir == 'inout':
            self._tickmarkers = ('_', '_')
            self._pad = self._base_pad + self._size / 2.
        else:
            self._tickmarkers = (mlines.TICKLEFT, mlines.TICKRIGHT)
            self._pad = self._base_pad + self._size

    # how far from the y axis line the right of the ticklabel are 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:18,代码来源:axis.py

示例2: apply_tickdir

# 需要导入模块: from matplotlib import lines [as 别名]
# 或者: from matplotlib.lines import TICKRIGHT [as 别名]
def apply_tickdir(self, tickdir):
        if tickdir is None:
            tickdir = rcParams['%s.direction' % self._name]
        self._tickdir = tickdir

        if self._tickdir == 'in':
            self._tickmarkers = (mlines.TICKRIGHT, mlines.TICKLEFT)
        elif self._tickdir == 'inout':
            self._tickmarkers = ('_', '_')
        else:
            self._tickmarkers = (mlines.TICKLEFT, mlines.TICKRIGHT)
        self._pad = self._base_pad + self.get_tick_padding()
        self.stale = True

    # how far from the y axis line the right of the ticklabel are 
开发者ID:PacktPublishing,项目名称:Mastering-Elasticsearch-7.0,代码行数:17,代码来源:axis.py

示例3: plot_day_summary

# 需要导入模块: from matplotlib import lines [as 别名]
# 或者: from matplotlib.lines import TICKRIGHT [as 别名]
def plot_day_summary(ax, quotes, ticksize=3,
                     colorup='k', colordown='r',
                     ):
    """
    quotes is a sequence of (time, open, close, high, low, ...) sequences

    Represent the time, open, close, high, low as a vertical line
    ranging from low to high.  The left tick is the open and the right
    tick is the close.

    time must be in float date format - see date2num

    ax          : an Axes instance to plot to
    ticksize    : open/close tick marker in points
    colorup     : the color of the lines where close >= open
    colordown   : the color of the lines where close <  open
    return value is a list of lines added
    """

    lines = []
    for q in quotes:

        t, open, close, high, low = q[:5]

        if close>=open : color = colorup
        else           : color = colordown

        vline = Line2D(
            xdata=(t, t), ydata=(low, high),
            color=color,
            antialiased=False,   # no need to antialias vert lines
            )

        oline = Line2D(
            xdata=(t, t), ydata=(open, open),
            color=color,
            antialiased=False,
            marker=TICKLEFT,
            markersize=ticksize,
            )

        cline = Line2D(
            xdata=(t, t), ydata=(close, close),
            color=color,
            antialiased=False,
            markersize=ticksize,
            marker=TICKRIGHT)

        lines.extend((vline, oline, cline))
        ax.add_line(vline)
        ax.add_line(oline)
        ax.add_line(cline)


    ax.autoscale_view()

    return lines 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:59,代码来源:finance.py


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