Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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') 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #matplotlib #axis #top
ADD COMMENT
Topic
Name
4+3 =