Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

seaborn rotate x labels

plt.figure(figsize=(15,8))

ax = sns.histplot(data=test, x='date')

ax.tick_params(axis='x', rotation=90)
Comment

seaborn rotate xlabels

plt.figure(figsize=(10,5))
chart = sns.countplot(
    data=data[data['Year'] == 1980],
    x='Sport',
    palette='Set1'
)
chart.set_xticklabels(chart.get_xticklabels(), rotation=45)
Comment

change xlabel rotate in seaborn

import pandas
import matplotlib.pylab as plt
import seaborn as sns
import numpy as np
plt.rcParams["figure.figsize"] = [7.50, 3.50]
plt.rcParams["figure.autolayout"] = True
df = pandas.DataFrame({"X-Axis": [np.random.randint(10) for i in range(10)], "YAxis": [i for i in range(10)]})
bar_plot = sns.barplot(x='X-Axis', y='Y-Axis', data=df)
plt.xticks(rotation=45)
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: complex arrays python 
Python :: python to run another code on timer while a separate code runs 
Python :: blender 2.8 python set active object 
Python :: python iterate with index 
Python :: how to write a while statement in python 
Python :: python add two numbers 
Python :: convert list of list to list python 
Python :: how to set background image in python tkinter 
Python :: multiline comment python 
Python :: posted data to flask 
Python :: python how to replace a certain string in text 
Python :: django orm sum 
Python :: cv2 imshow in colab 
Python :: How to select rows in a DataFrame between two values, in Python Pandas? 
Python :: get current module name python 
Python :: python web parse 
Python :: load json py 
Python :: ms access python dataframe 
Python :: reverse range in python 
Python :: difference between two dictionaries python 
Python :: python create function 
Python :: python delete value from dictionary 
Python :: ros python service server 
Python :: scipy cosine distance 
Python :: moving file in python 
Python :: delete tuple from list python 
Python :: kill python process with bash 
Python :: python save dictionary 
Python :: python open all files of type csv 
Python :: line length in flake8 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =