I would like to plot a line with varying thickness using matplotlib in python.
To be clearer, I have the following variable
import matplotlib.pyplot as P
import numpy as N
x_value = N.arange(0,10,1)
y_value = N.random.rand(10)
bandwidth = N.random.rand(10)*10
P.plot(x_value,y_value,bandwidth)
I would like to plot a line with x_value and y_value and a thickness that vary with the x_value position and given by the bandwidth vector.
A possible solution that I see would be to draw the upper and lower line (i.e. I take y_value[index] +- bandwidth[index]/2 and plot those two lines.
Then I could try to fill the space between the two lines (how?)
If you have any suggestions?
Thank you,
Samuel.