I have a filled contour plot and I want to display the 1d slices of its two parameters. My contour plot was constructed by the following code:
import numpy as np
import matplotlib.pyplot as plt
import math
a=([8.0,9.0,10.0]) #a,b are the two axes in contour plot
b=([1.0,2.0,3.0])
c=[]
for i in range(0,len(a)):
for j in range(0,len(b)):
c.append(math.exp(a[i]/b[j])) #c is the colour
c=np.array(c,dtype=float)
c=c.reshape(len(a),len(b))
y,x=np.meshgrid(b,a)
plt.contourf(x,y,c)
And my image looks like:
But the kind of plot I want is:
Is there a way to do it with matplotlib?