Python matplotlib.lines.TICKRIGHT Examples

The following are 12 code examples of matplotlib.lines.TICKRIGHT(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module matplotlib.lines , or try the search function .
Example #1
Source File: axis.py    From Computable with MIT License 6 votes vote down vote up
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 
Example #2
Source File: axis.py    From matplotlib-4-abaqus with MIT License 6 votes vote down vote up
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 
Example #3
Source File: axis.py    From neural-network-animation with MIT License 6 votes vote down vote up
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 
Example #4
Source File: axis.py    From ImageFusion with MIT License 6 votes vote down vote up
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 
Example #5
Source File: axis.py    From Mastering-Elasticsearch-7.0 with MIT License 5 votes vote down vote up
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 
Example #6
Source File: axis.py    From GraphicDesignPatternByPython with MIT License 5 votes vote down vote up
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 
Example #7
Source File: axis.py    From python3_ios with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
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 
Example #8
Source File: axis.py    From coffeegrindsize with MIT License 5 votes vote down vote up
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 
Example #9
Source File: axis.py    From CogAlg with MIT License 5 votes vote down vote up
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 
Example #10
Source File: axis.py    From twitter-stock-recommendation with MIT License 5 votes vote down vote up
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 
Example #11
Source File: finance.py    From Computable with MIT License 4 votes vote down vote up
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 
Example #12
Source File: finance.py    From matplotlib-4-abaqus with MIT License 4 votes vote down vote up
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