<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 PmodTMP2 Sensor example
In this example, the Pmod temperature sensor is initialized and set to log a reading every 1 second. 
This examples required the PmodTMP2 sensor, and assumed it is attached to PMODB.
1. Simple TMP2 read() to see current room temperature
Step1:  2. Starting logging temperature once every second
Step2:  3. Try to modify temperature reading by touching the sensor
The default interval between samples is 1 second. So wait for at least 10 seconds to get enough samples.
During this period, try to press finger on the sensor to increase its temperature reading.
Stop the logging whenever done trying to change sensor's value.
Step3:  5. Plot values over time
<ASSISTANT_TASK:>
Python Code:
from pynq import Overlay
Overlay("base.bit").download()
from pynq.iop import Pmod_TMP2
from pynq.iop import PMODB
mytmp = Pmod_TMP2(PMODB)
temperature = mytmp.read()
print(str(temperature) + " C")
Explanation: PmodTMP2 Sensor example
In this example, the Pmod temperature sensor is initialized and set to log a reading every 1 second. 
This examples required the PmodTMP2 sensor, and assumed it is attached to PMODB.
1. Simple TMP2 read() to see current room temperature
End of explanation
mytmp.start_log()
Explanation: 2. Starting logging temperature once every second
End of explanation
mytmp.stop_log()
log = mytmp.get_log()
Explanation: 3. Try to modify temperature reading by touching the sensor
The default interval between samples is 1 second. So wait for at least 10 seconds to get enough samples.
During this period, try to press finger on the sensor to increase its temperature reading.
Stop the logging whenever done trying to change sensor's value.
End of explanation
%matplotlib inline
import matplotlib.pyplot as plt
plt.plot(range(len(log)), log, 'ro')
plt.title('TMP2 Sensor log')
plt.axis([0, len(log), min(log), max(log)])
plt.show()
Explanation: 5. Plot values over time
End of explanation
<END_TASK>