I made a loop on categorical grades which plot a certain number of graphics related to this grade. As far as these grades are categorical I was wondering if it would be more interesting to display it in hue. So far I do:

for grade in result.grade.unique():
    local_low_dimensional_split = result.loc[result['grade'] == grade]
    local_low_dimensional_split[['installment','dti','revol_bal','revol_util','inq_last_6mths','delinq_2yrs','pub_rec','loan_status']].hist(color='steelblue', edgecolor='black', linewidth=1.0, grid=False)
    plt.tight_layout(rect=(0, 0, 2.2, 2.2))
    plt.title(str(grade)) # can't display the name

introducir la descripción de la imagen aquí introducir la descripción de la imagen aquí ...

I wonder if it would be better to use the hue method : to use one color for each grade and plot the results side by side. However I have 6 categories which might be a lot.

If you're critical of the data visualization, I'm interested. For the moment I have based myself on this article.


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.