python|using Seaborn library

Question

Assume that you have imported csv file.

write a function to plot x and y axis with hue.

in progress 0
razack_ar 55 years 1 Answer 673 views Member 4

Answer ( 1 )

  1. import numpy as np
    import pandas as pd
    from matplotlib import pyplot as plt
    import seaborn as sns

    plt.figure()
    sns.lmplot(x=’xxxx’, y=’yyyyy’, data=df,
    fit_reg=False,
    hue=’yyyyy’)
    plt.show()

    note:here xxx=column name, yyy=column name, hue=column name

Leave an answer

Browse
Browse