# Moku:lab oscilloscope cursor in python

**URL:** <https://forum.liquidinstruments.com/t/moku-lab-oscilloscope-cursor-in-python/1036>\
**Category:** Software & APIs\
**Created:** [September 11, 2024, 9:35am UTC](https://forum.liquidinstruments.com/t/moku-lab-oscilloscope-cursor-in-python/1036 "2024-09-11T09:35:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saman](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Saman](https://forum.liquidinstruments.com/u/Saman)\
**Post date:** [September 11, 2024, 9:35am UTC](https://forum.liquidinstruments.com/t/moku-lab-oscilloscope-cursor-in-python/1036/1 "2024-09-11T09:35:02Z")

</div>

I use moku:lab and get data from the oscilloscope using  
data = i.get\_data()  
I plot the data using matplotlib. I search for the mean and max value of my sinusoidal signal. for this I use numpy np.max(data[‘ch1’]) and np.mean(data[‘ch1’].  
. I want to set a cursor at these values using python code. I found i.set\_ycursor() or i.set\_xcursor(). But it seems to be the wrong code for cursors. The error say’s:  
Oscilloscope has no attribute set\_ycursor().  
My question is asking for a correct way to call cursor or asking if there is any possibility to set cursors in moku API.  
best  
Saman

---

<div class="post-metadata">

**Author:** ![hanklong](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.liquidinstruments.com/hanklong/32/288_2.png) [@hanklong](https://forum.liquidinstruments.com/u/hanklong)\
**Post date:** [September 12, 2024, 5:58pm UTC](https://forum.liquidinstruments.com/t/moku-lab-oscilloscope-cursor-in-python/1036/2 "2024-09-12T17:58:36Z")

</div>

Hi Saman @Saman ,

The cursors are visualization tools. You will need to use Python and matplotlib to plot the cursors on the figure. Moku will only return the captured frames.

Our API reference page provides the full list of supported commands: [https://apis.liquidinstruments.com/reference/oscilloscope/](https://apis.liquidinstruments.com/reference/oscilloscope/)

Thanks,  
Hank
