Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

change axis and axis label color matplotlib

import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(111)

ax.plot(range(10))
ax.set_xlabel('X-axis')
ax.set_ylabel('Y-axis')

ax.spines['bottom'].set_color('red')
ax.spines['top'].set_color('red')
ax.xaxis.label.set_color('red')
ax.tick_params(axis='x', colors='red')

plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: which python mac 
Python :: python get the elements between quotes in string 
Python :: How to set "Unnamed: 0" column as the index in a DataFrame 
Python :: pandas read csv without index 
Python :: min max scaler on one column 
Python :: day difference between two dates in python 
Python :: python print a help of a script 
Python :: python show image cv2 
Python :: use miraculous with token 
Python :: Not getting spanish characters python 
Python :: resample and replace with mean in python 
Python :: using-len-for-text-but-discarding-spaces-in-the-count 
Python :: remove special characters from dictionary python 
Python :: is prime python 
Python :: Python Current time using time module 
Python :: y=mx+b python 
Python :: python parse dict from string 
Python :: datafram from one date to another 
Python :: python specify typeError output 
Python :: how do i change the hue color in seaborn 
Python :: pandas find median of non zero values in a column 
Python :: drop duplicates pandas first column 
Python :: label encoder pyspark 
Python :: SQL Query to Join Two Tables Based Off Closest Timestamp 
Python :: create a sequence of numbers in python 
Python :: python record screen 
Python :: date format in django template 
Python :: f string python not working in linux 
Python :: maximo numero de variables dentro de un .def python 
Python :: merge multiple csv files into one dataframe python 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =