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 :: postgres django settings 
Python :: sqlalchemy python install 
Python :: number table python 
Python :: pytorch check if using gpu 
Python :: python iterate through date range 
Python :: python wait 1 sec 
Python :: import validation error in django 
Python :: python use tqdm with concurrent futures 
Python :: how many nan in array python 
Python :: pandas convert string from INT TO str 
Python :: python clamp 
Python :: python sort a dictionary by values 
Python :: time it python 
Python :: rename columns in python 
Python :: How to have add break for a few seconds in python 
Python :: python install pip 
Python :: pylsp install 
Python :: how to make a python program to convert inch into cm 
Python :: Drop specific column in data 
Python :: python alphabet capital 
Python :: find common elements in two lists python 
Python :: how to make a custom icon for pygame 
Python :: webhook discord files 
Python :: get list of column names pandas 
Python :: python reload file if changed 
Python :: how to find ip address of website using python 
Python :: download pdf from link using python 
Python :: timeout exception in selenium python 
Python :: how to execute python script in another script 
Python :: get python script path 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =