import pylab
import numpy

# constant values
V0=5
rG=20

# create the array R containing 500 values 
# evenly spaced, in the logarithmic space, 
# between 1e1 and 1e6
R = numpy.logspace(1,6,100)

# evaluate the function
I=V0/(R+rG)

# set the log log scale
pylab.xscale('log')
pylab.yscale('log')

# bellurie che dovete ricordare!
pylab.rc('font',size=16)
pylab.xlabel('R  [ohm]')
pylab.ylabel('I  [A]')

# draw the plot
pylab.plot(R,I,color='black')


# save the plot (in my own directory!)
pylab.savefig('D:\stash\dida14_15\lab2_14_15\simul_res_int\plot3.pdf')

# display the plot on screen
pylab.show()

