gseapy/plot.py
def adjust_spines(ax, spines):
    """function for removing spines and ticks.

    :param ax: axes object
    :param spines: a list of spines names to keep. e.g [left, right, top, bottom]
                    if spines = []. remove all spines and ticks.

    """
    for loc, spine in ax.spines.items():
        if loc in spines:
            # spine.set_position(('outward', 10))  # outward by 10 points
            # spine.set_smart_bounds(True)
            continue
        else:
            spine.set_color('none')  # don't draw spine

    # turn off ticks where there is no spine
    if 'left' in spines:
        ax.yaxis.set_ticks_position('left')
    else:
        # no yaxis ticks
        ax.yaxis.set_ticks([])

    if 'bottom' in spines:
        ax.xaxis.set_ticks_position('bottom')
    else:
        # no xaxis ticks
        ax.xaxis.set_ticks([])
def adjust_spines(ax, spines):
    for loc, spine in ax.spines.items():
        if loc in spines:
            # spine.set_position(('outward', 10))  # outward by 10 points
            # spine.set_smart_bounds(True)
            continue
        else:
            spine.set_color('none')  # don't draw spine

    # turn off ticks where there is no spine
    if 'left' in spines:
        ax.yaxis.set_ticks_position('left')
    else:
        # no yaxis ticks
        ax.yaxis.set_ticks([])

    if 'bottom' in spines:
        ax.xaxis.set_ticks_position('bottom')
    else:
        # no xaxis ticks
        ax.xaxis.set_ticks([])
def adjust_spines ( ax , spines ) : for loc , spine in ax . spines . items ( ) : if loc in spines : # spine.set_position(('outward', 10))  # outward by 10 points # spine.set_smart_bounds(True) continue else : spine . set_color ( 'none' ) # don't draw spine # turn off ticks where there is no spine if 'left' in spines : ax . yaxis . set_ticks_position ( 'left' ) else : # no yaxis ticks ax . yaxis . set_ticks ( [ ] ) if 'bottom' in spines : ax . xaxis . set_ticks_position ( 'bottom' ) else : # no xaxis ticks ax . xaxis . set_ticks ( [ ] )
function for removing spines and ticks.

    :param ax: axes object
    :param spines: a list of spines names to keep. e.g [left, right, top, bottom]
                    if spines = []. remove all spines and ticks.
function for removing spines and ticks .