Python matplotlib.lines.TICKDOWN Examples

The following are 13 code examples of matplotlib.lines.TICKDOWN(). 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 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.TICKUP, mlines.TICKDOWN)
            self._pad = self._base_pad
        elif self._tickdir == 'inout':
            self._tickmarkers = ('|', '|')
            self._pad = self._base_pad + self._size / 2.
        else:
            self._tickmarkers = (mlines.TICKDOWN, mlines.TICKUP)
            self._pad = self._base_pad + self._size 
Example #2
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.TICKUP, mlines.TICKDOWN)
        elif self._tickdir == 'inout':
            self._tickmarkers = ('|', '|')
        else:
            self._tickmarkers = (mlines.TICKDOWN, mlines.TICKUP)
        self._pad = self._base_pad + self.get_tick_padding()
        self.stale = True 
Example #3
Source File: axis.py    From matplotlib-4-abaqus 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.TICKUP, mlines.TICKDOWN)
            self._pad = self._base_pad
        elif self._tickdir == 'inout':
            self._tickmarkers = ('|', '|')
            self._pad = self._base_pad + self._size / 2.
        else:
            self._tickmarkers = (mlines.TICKDOWN, mlines.TICKUP)
            self._pad = self._base_pad + self._size 
Example #4
Source File: axis.py    From neural-network-animation 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.TICKUP, mlines.TICKDOWN)
            self._pad = self._base_pad
        elif self._tickdir == 'inout':
            self._tickmarkers = ('|', '|')
            self._pad = self._base_pad + self._size / 2.
        else:
            self._tickmarkers = (mlines.TICKDOWN, mlines.TICKUP)
            self._pad = self._base_pad + self._size 
Example #5
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.TICKUP, mlines.TICKDOWN)
        elif self._tickdir == 'inout':
            self._tickmarkers = ('|', '|')
        else:
            self._tickmarkers = (mlines.TICKDOWN, mlines.TICKUP)
        self._pad = self._base_pad + self.get_tick_padding()
        self.stale = True 
Example #6
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.TICKUP, mlines.TICKDOWN)
        elif self._tickdir == 'inout':
            self._tickmarkers = ('|', '|')
        else:
            self._tickmarkers = (mlines.TICKDOWN, mlines.TICKUP)
        self._pad = self._base_pad + self.get_tick_padding()
        self.stale = True 
Example #7
Source File: axis.py    From ImageFusion 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.TICKUP, mlines.TICKDOWN)
            self._pad = self._base_pad
        elif self._tickdir == 'inout':
            self._tickmarkers = ('|', '|')
            self._pad = self._base_pad + self._size / 2.
        else:
            self._tickmarkers = (mlines.TICKDOWN, mlines.TICKUP)
            self._pad = self._base_pad + self._size 
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.TICKUP, mlines.TICKDOWN)
        elif self._tickdir == 'inout':
            self._tickmarkers = ('|', '|')
        else:
            self._tickmarkers = (mlines.TICKDOWN, mlines.TICKUP)
        self._pad = self._base_pad + self.get_tick_padding()
        self.stale = True 
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.TICKUP, mlines.TICKDOWN)
        elif self._tickdir == 'inout':
            self._tickmarkers = ('|', '|')
        else:
            self._tickmarkers = (mlines.TICKDOWN, mlines.TICKUP)
        self._pad = self._base_pad + self.get_tick_padding()
        self.stale = True 
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.TICKUP, mlines.TICKDOWN)
        elif self._tickdir == 'inout':
            self._tickmarkers = ('|', '|')
        else:
            self._tickmarkers = (mlines.TICKDOWN, mlines.TICKUP)
        self._pad = self._base_pad + self.get_tick_padding()
        self.stale = True 
Example #11
Source File: LSDMap_BasicPlotting.py    From LSDMappingTools with MIT License 4 votes vote down vote up
def TickSpineFormatter(ax, sizeformat = "esurf"):
    """This formats the line weights on the bounding box and ticks.

    Args:
        ax1 (axis object): the matplotlib axis object
        size_format (str): The size format. Can be geomorhpology, esurf or big

    returns:
        The axis object

    Author: SMM
    """

    import matplotlib.lines as mpllines

    # some formatting to make some of the ticks point outward
    for line in ax.get_xticklines():
        line.set_marker(mpllines.TICKDOWN)

    for line in ax.get_yticklines():
        line.set_marker(mpllines.TICKLEFT)

    if sizeformat == "esurf":
        lw = 1.0
        pd = 8
    elif sizeformat == "geomorphology":
        lw = 1.5
        pd = 10
    elif sizeformat == "big":
        lw = 2
        pd = 12
    else:
        lw = 1.0
        pd = 8

    ax.spines['top'].set_linewidth(lw)
    ax.spines['left'].set_linewidth(lw)
    ax.spines['right'].set_linewidth(lw)
    ax.spines['bottom'].set_linewidth(lw)

    # This gets all the ticks, and pads them away from the axis so that the corners don't overlap
    ax.tick_params(axis='both', width=lw, pad = pd)
    for tick in ax.xaxis.get_major_ticks():
        tick.set_pad(pd)

    return ax



#==============================================================================
# This formats ticks if you want to convert metres to km
#============================================================================== 
Example #12
Source File: tukeyplot.py    From vnpy_crypto with MIT License 4 votes vote down vote up
def tukeyplot(results, dim=None, yticklabels=None):
    npairs = len(results)

    fig = plt.figure()
    fsp = fig.add_subplot(111)
    fsp.axis([-50,50,0.5,10.5])
    fsp.set_title('95 % family-wise confidence level')
    fsp.title.set_y(1.025)
    fsp.set_yticks(np.arange(1,11))
    fsp.set_yticklabels(['V-T','V-S','T-S','V-P','T-P','S-P','V-M',
                         'T-M','S-M','P-M'])
    #fsp.yaxis.set_major_locator(mticker.MaxNLocator(npairs))
    fsp.yaxis.grid(True, linestyle='-', color='gray')
    fsp.set_xlabel('Differences in mean levels of Var', labelpad=8)
    fsp.xaxis.tick_bottom()
    fsp.yaxis.tick_left()

    xticklines = fsp.get_xticklines()
    for xtickline in xticklines:
        xtickline.set_marker(lines.TICKDOWN)
        xtickline.set_markersize(10)

    xlabels = fsp.get_xticklabels()
    for xlabel in xlabels:
        xlabel.set_y(-.04)

    yticklines = fsp.get_yticklines()
    for ytickline in yticklines:
        ytickline.set_marker(lines.TICKLEFT)
        ytickline.set_markersize(10)

    ylabels = fsp.get_yticklabels()
    for ylabel in ylabels:
        ylabel.set_x(-.04)

    for pair in range(npairs):
        data = .5+results[pair]/100.
        #fsp.axhline(y=npairs-pair, xmin=data[0], xmax=data[1], linewidth=1.25,
        fsp.axhline(y=npairs-pair, xmin=data.mean(), xmax=data[1], linewidth=1.25,
            color='blue', marker="|",  markevery=1)

        fsp.axhline(y=npairs-pair, xmin=data[0], xmax=data.mean(), linewidth=1.25,
            color='blue', marker="|", markevery=1)

    #for pair in range(npairs):
    #    data = .5+results[pair]/100.
    #    data = results[pair]
    #    data = np.r_[data[0],data.mean(),data[1]]
    #    l = plt.plot(data, [npairs-pair]*len(data), color='black',
    #                linewidth=.5, marker="|", markevery=1)

    fsp.axvline(x=0, linestyle="--", color='black')

    fig.subplots_adjust(bottom=.125) 
Example #13
Source File: tukeyplot.py    From Splunking-Crime with GNU Affero General Public License v3.0 4 votes vote down vote up
def tukeyplot(results, dim=None, yticklabels=None):
    npairs = len(results)

    fig = plt.figure()
    fsp = fig.add_subplot(111)
    fsp.axis([-50,50,0.5,10.5])
    fsp.set_title('95 % family-wise confidence level')
    fsp.title.set_y(1.025)
    fsp.set_yticks(np.arange(1,11))
    fsp.set_yticklabels(['V-T','V-S','T-S','V-P','T-P','S-P','V-M',
                         'T-M','S-M','P-M'])
    #fsp.yaxis.set_major_locator(mticker.MaxNLocator(npairs))
    fsp.yaxis.grid(True, linestyle='-', color='gray')
    fsp.set_xlabel('Differences in mean levels of Var', labelpad=8)
    fsp.xaxis.tick_bottom()
    fsp.yaxis.tick_left()

    xticklines = fsp.get_xticklines()
    for xtickline in xticklines:
        xtickline.set_marker(lines.TICKDOWN)
        xtickline.set_markersize(10)

    xlabels = fsp.get_xticklabels()
    for xlabel in xlabels:
        xlabel.set_y(-.04)

    yticklines = fsp.get_yticklines()
    for ytickline in yticklines:
        ytickline.set_marker(lines.TICKLEFT)
        ytickline.set_markersize(10)

    ylabels = fsp.get_yticklabels()
    for ylabel in ylabels:
        ylabel.set_x(-.04)

    for pair in range(npairs):
        data = .5+results[pair]/100.
        #fsp.axhline(y=npairs-pair, xmin=data[0], xmax=data[1], linewidth=1.25,
        fsp.axhline(y=npairs-pair, xmin=data.mean(), xmax=data[1], linewidth=1.25,
            color='blue', marker="|",  markevery=1)

        fsp.axhline(y=npairs-pair, xmin=data[0], xmax=data.mean(), linewidth=1.25,
            color='blue', marker="|", markevery=1)

    #for pair in range(npairs):
    #    data = .5+results[pair]/100.
    #    data = results[pair]
    #    data = np.r_[data[0],data.mean(),data[1]]
    #    l = plt.plot(data, [npairs-pair]*len(data), color='black',
    #                linewidth=.5, marker="|", markevery=1)

    fsp.axvline(x=0, linestyle="--", color='black')

    fig.subplots_adjust(bottom=.125)