Skip to content

Tag: seaborn

How to *Rotate* labels in a Seaborn PairGrid?

The columns in my dataframe has long names, so when I make a pairplot, the labels overlaps one another. I would like to rotate my labels 90 degrees, so they don’t collide. I tried looking up online and documentation, but could not find a solution. Here is something I wrote & the error message: How c…

Connecting means in seaborn box plot

I want to connect box plot means. I can do the basic part but cannot connect box plot means and box plots offset from x axis. similar post but not connecting means Python: seaborn pointplot and boxplot in one plot but shifted on the x-axis As we can see the sns.line plot does not follow the means and box plot…

Seaborn expands X axis dates back to year 2000

I have a pandas dataframe that contains dates starting at 2017-09-01 (which I believe is in the correct format for a dataframe date). But the X axis is expanded dramatically. I do not have any outliers on the LHS. Answer Pandas and matplotlib’s dates sometimes don’t go along well. You can set the …

Time Series Plot Seaborn with MultiIndex

I have the following dataset: The dataset spans three months and counts the occurrence of five codes per day. In order to plot the data I have just used the following code: I am wondering though, how this can be done using seaborn and a lineplot ? Answer Is this what you are looking for?