Exemple #1
0
def legend_size_medium_test():
    test_data = pd.DataFrame({
        'Sample': ['Loooooong label 1', 'Loooooong label 2', 'Loooooong label 3'],
        'A': [1, 3, 5],
        'B': [2, 4, 1],
        'C': [3, 8, 4],
    })
    plot.stacked_bar_chart(data=test_data, x='Sample', y=['A', 'B', 'C'], legend_size='medium')
Exemple #2
0
def legend_title_test():
    test_data = pd.DataFrame({
        'Sample': ['Loooooong label 1', 'Loooooong label 2', 'Loooooong label 3'],
        'A': [1, 3, 5],
        'B': [2, 4, 1],
        'C': [3, 8, 4],
    })
    plot.stacked_bar_chart(data=test_data, x='Sample', y=['A', 'B', 'C'], legend_title='Mutation type')
Exemple #3
0
def stacked_bar_chart_hide_xticklabels_test():
    test_data = pd.DataFrame({
        'Sample': ['Loooooong label 1', 'Loooooong label 2', 'Loooooong label 3'],
        'A': [1, 3, 5],
        'B': [2, 4, 1],
        'C': [3, 8, 4],
    })
    plot.stacked_bar_chart(data=test_data, x='Sample', y=['A', 'B', 'C'], xticklabels=False)
Exemple #4
0
def stacked_bar_chart_single_y_test():
    test_data = pd.DataFrame({
        'Sample': ['S1', 'S2', 'S3'],
        'A': [1, 3, 5],
        'B': [2, 4, 1],
        'C': [3, 8, 4],
    })
    plot.stacked_bar_chart(data=test_data, x='Sample', y=['A'])
Exemple #5
0
def stacked_bar_chart_sort_ascending_test():
    test_data = pd.DataFrame({
        'Sample': ['S1', 'S2', 'S3'],
        'A': [1, 3, 5],
        'B': [2, 4, 1],
        'C': [3, 8, 4],
    })
    plot.stacked_bar_chart(data=test_data, x='Sample', y=['A', 'B', 'C'], sort=True, reverse=False)
Exemple #6
0
def stacked_bar_chart_basic_test():
    test_data = pd.DataFrame({
        'Sample': ['S1', 'S2', 'S3'],
        'A': [5, 2, 8],
        'B': [2, 1, 5],
        'C': [1, 4, 2],
    })
    plot.stacked_bar_chart(data=test_data, x='Sample', y=['A', 'B', 'C'])
Exemple #7
0
def stacked_bar_chart_group_test():
    test_data = pd.DataFrame({
        'Sample': ['S1', 'S2', 'S3', 'S4', 'S5'],
        'A': [1, 3, 5, 1, 5],
        'B': [2, 4, 1, 2, 5],
        'C': [3, 8, 4, 6, 3],
        'Group': ['G1', 'G2', 'G1', 'G1', 'G2'],
    })
    plot.stacked_bar_chart(data=test_data, x='Sample', y=['A', 'B', 'C'], group='Group')