Jump to content
  • 0

Documentation on "plot1" in Scripts


AndrewK

Question

Where can I find documentation on "plot1" use in Scripts?

Does not seem to be documented with the rest of the scripts objects in the manual.  Can get it basically working by trial and error and figuring some of the methods and fields using auto-completion, but there are quite a few options and not sure what they do or how to use them.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Thank you for your reply.  It took me a while to even figure out to use plot1.Y1.data as did not find any documentation but did eventually find some example scripts on the net.  

Any idea what "name" and "label" (two fields listed code completion for both "plot1" and "plot1.Y1") do?

 

Link to comment
Share on other sites

Hi @AndrewK

The name and label are not useful for Script/Plot.

The Script exposes almost all the objects/functions/properties behind the user interface, like the X, Y1 are objects which have a name and label.
The Script is intended to automate some processes, but the general configuration like name, label, units, configuring channels.. are easier to be done in the user interface.
You can save and load the Script together with all the other instruments in one workspace.

The plot has the following useful Script options:

 plot#            plots in Script tool
    .X()            X axis
    .Y1-4()            Y axis
       .Units.text            set/get axis unit
       .AutoScale.checked    set/get auto scaling option
       .Range.value            set/get range value
       .Offset.value        set/get offset value
       .data                set/get data array
                            Setting data for the X axis the plot will become an XY plot

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...