Use ipywidgets to interatively find best position matplotlib text
<p>I am interested in using the interact function to use a slider to adjust the position of text in a matplotlib plot (you know, instead of adjusting the position, running the code, and repeating 1000 times).</p>

<p>Here's a simple example of a plot</p>

<pre><code>import matplotlib.pyplot as plt
x=0.2
y=0.9
plt.text(x, y,'To move',size=19)
plt.show()
</code></pre>

<p>and some interact code</p>

<pre><code>from __future__ import print_function
from ipywidgets import interact, interactive, fixed
import ipywidgets as widgets
def f(x):
    return x
interact(f, cx=0.2)
</code></pre>

<p>I'm wondering how I can combine these to generate a plot with the text along with a slider that will interactively move the text based on the specified value for x. Is this possible? What if I want to do the same for y?</p>

<p>Thanks in advance!</p>