Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

two labels on one axis python

import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rc
rc('mathtext', default='regular')

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(time, Swdown, '-', label = 'Swdown')
ax.plot(time, Rn, '-', label = 'Rn')
ax2 = ax.twinx()
ax2.plot(time, temp, '-r', label = 'temp')
ax.legend(loc=0)
ax.grid()
ax.set_xlabel("Time (h)")
ax.set_ylabel(r"Radiation ($MJ,m^{-2},d^{-1}$)")
ax2.set_ylabel(r"Temperature ($^circ$C)")
ax2.set_ylim(0, 35)
ax.set_ylim(-20,100)
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: Return the number of elements in this RDD. 
Python :: Return an RDD of grouped items. 
Python :: Compute the mean of this RDD’s elements. 
Python :: Add up the elements in this RDD 
Python :: what is mi casa in spanish 
Python :: Applies the f function to all Row of this DataFrame 
Python :: data exfiltration icmp 
Python :: pygame rect follower 
Python :: pip img2pdf 
Python :: assert vs validate in python 
Python :: python write request must be str not bytes 
Python :: sns.distplot fit 
Python :: set list start at 1 python 
Python :: cambiar barra de etitulo tkinter 
Python :: if using and in python 
Python :: problem with console writeline python 
Python :: python writelignes 
Python :: py 
Python :: how to convert exe file to python file 
Python :: numpy euclidean distance matrix broadcasting 
Python :: knox token lifetime 
Python :: pycaw , Python Audio Control Lib 
Python :: wie printe ich in python 
Python :: django foriegn key filter sample 
Python :: datetime pypi 
Python :: write dict to json file with special characters 
Python :: pdf to excel python 
Python :: newick string python 
Python :: append to a ldictionary value list 
Python :: if number Of Players == =4 python 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =