1
$\begingroup$

I have the following code that shows 10 dataframe column values separated by categories PREFERENCE = GOOD and PREFERENCE = BAD. Is it possible to expand the layout horisontally so that instead of 2 images on one row there are four of them (i.e. ACOUSTIC and DANCE)?

for audio_feature in ['ACOUSTIC', 'DANCE', 'DURATION', 'ENERGY', 'INSTRUMENTAL', 'LIVE', 'LOUD', 'SPEECH', 'TEMPO', 'VALENCE']:
    count, bin_edges = np.histogram(features_df[audio_feature])
    g = sns.FacetGrid(features_df, col='PREFERENCE')
    g.map(plt.hist, audio_feature, color="steelblue", bins=bin_edges) #color="coral"
    plt.show()

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.