import cursor in qutip

11 views
Skip to first unread message

ANUSHREE DEY

unread,
Jan 21, 2022, 5:25:44 AM1/21/22
to QuTiP: Quantum Toolbox in Python
Dear all,
           I am trying to import cursor in qutip but can not do it successfully. Therefore, any help in this regard is highly appreciated.
Thanking you
regards
Anushree

Simon Cross

unread,
Jan 21, 2022, 9:28:00 AM1/21/22
to qu...@googlegroups.com
Hi Anushree,

Could you give a short example of the code that is failing? I have no idea what "cursor" is in this context.

Yours sincerely,
Simon Cross

ANUSHREE DEY

unread,
Jan 25, 2022, 5:46:36 AM1/25/22
to qu...@googlegroups.com
dear Simon,
        I just want to know the exact xy position of a point in  a figure and that's why I wanted to import Cursor, like we did in python3.
'from qutip import *
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Cursor'
then to add this feature in a figure,I did
fig,ax=plt.subplots()
p,=plt.plot(time,np.real(Qt),color='red', linestyle='dashed', linewidth = 3)
cursor=Cursor(ax,horiZon=True,verTon=True,useblit=True,color='r',
             linewidth=2)
plt.show()

But I could not manage to add it. My aim is to just know the exact xy position of any point of a plot. if there is any other option in which we can do this or any references, please  let me know.
regards
Anushree

--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qutip/CAD5NRCHvKajDioRRTQWy8TSRA2Awjt8w8e_DgKHsxAdoHWhO_Q%40mail.gmail.com.

Simon Cross

unread,
Jan 25, 2022, 8:21:14 AM1/25/22
to qu...@googlegroups.com
Hi Anushree,

I see. I guess this is more of an issue using matplotlib than QuTiP,
but what was the error you got or what went wrong?

Regards,
Simon
Reply all
Reply to author
Forward
0 new messages