> Hello. I have some problem with showing plots on the graph.
> I should show some plots on one graph in different colors. I am using
> attribute node to change color programmatically but than more plots I
> show more time it takes to update plots in new color. How can I make
> it faster?
Two approaches to take and a couple things to watch for.
The graph has a property for the Active Plot. Setting this
larger than the number of plots in the data doesn't automatically
allocate plots for the graph.
You can grow the plot legend to preallocate plots, or wire data
that describes plots, even empty plots, and this will allocate
them.
Once you have plots, each time you change the color or other
attributes, the graph will typically redraw, and as you noted,
this can ta
ke some time if you have lots of plots or complicated
data.
If you plot very little data, such as a bunch of empty plots,
the redraws will take very little time, then write the data
to the graph.
If you have LV6, a newer way of doing this, which also works
with most other display intensive operations is to write to
the Deferred Updates property for the panel. Drop a property
node and choose the VI class. From this select the Panel
property. Wire this to another property node, and on the
list you will see a property for Deferring panel updates.
Set this to True, then update all of the plots regardless
of how much data is in them. Update any other properties
you like, then set the Deferred Updates to False to draw
the results in one pass.
Greg McKaskle