Answers for "matplotlib data for x axis"

4

add x axis label python

plt.xlabel("X axis label")
Posted by: Guest on April-06-2020
1

matplotlib x axis at the top

import matplotlib.pyplot as plt
import matplotlib

fig = plt.figure()
ax = fig.add_axes([0.12,0.15,0.75,0.8])
ax.set_xlabel("X")
#Set axis to top
ax.xaxis.tick_top()
#Set x axis lable to top
ax.xaxis.set_label_position('top')
Posted by: Guest on September-02-2021

Python Answers by Framework

Browse Popular Code Answers by Language