From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

controlling cluster size in multiplot chart

Hello,

I have a chart that periodically plots a new array of data points.
The array is passed through an "array to cluster" function before
being sent to the chart.

Problem is that the size of my array can change, but the "array to cluster"
function has a default cluster size that cannot be changed programmatically.
This means that, if initially my array size is only 7, that everything works
OK,
but if the array size decreases to 4, the cluster size remains at 7 and the
chart
plots redundent zero values that are not real data. Also, if the array size
is ever
greater than 9, the "array to cluster" truncates the data to 9 elements. The
"array
to cluster" function seems to remember the maximum size of the array,
fills
unused elements with zeros, and truncates elements beyond its "default
size".

Is there any way to resize the cluster so that the chart plots only the
points
I supply, without redundent zeros or truncations?

Thanks for your help.

Brett Patterson

--
____________________________________________________________________________
Dr Brett Patterson, BSc Hons (Western Aust.), PhD (Cantab.), CPhys, MInstP.

Optical+Biomedical Engineering Laboratory _--_|\
Electrical & Electronic Engineering / \
The University of Western Australia *_.--._/
Nedlands, WA 6907, AUSTRALIA v

Tel: +61 8 9380 2317 Fax: +61 8 9380 1065
mailto:Brett.Patterson@uwa.edu.au http://www.ee.uwa.edu.au/~obel
____________________________________________________________________________
0 Kudos
Message 1 of 3
(2,709 Views)
Hello

Wire a 2D array to the chart terminal:
colums: number of graphs
lines:number of points to add to each graph

But when you change the number of colums from one write to the next, the
graph is reset. Read, resize and rewrite chart attribute node "History data"
if you want to dynamically change the number of graph while keeping entire
history.


--
Jean-Pierre Drolet
Scientech R&D inc
Trois-Rivieres-Ouest (Quebec)
CANADA G8Z 4H1


Brett Patterson a �crit dans le message :
8ankf5$9tj$1@enyo.uwa.edu.au...
> Hello,
>
> I have a chart that periodically plots a new array of data points.
> The array is passed through an "array to cluster" function before
> being sent to the chart.
>
> Problem is that the size of my array can change, but the "array to
cluster"
> function has a default cluster size that cannot be changed
programmatically.
> This means that, if initially my array size is only 7, that everything
works
> OK,
> but if the array size decreases to 4, the cluster size remains at 7 and
the
> chart
> plots redundent zero values that are not real data. Also, if the array
size
> is ever
> greater than 9, the "array to cluster" truncates the data to 9 elements.
The
> "array
> to cluster" function seems to remember the maximum size of the array,
fills
> unused elements with zeros, and truncates elements beyond its "default
> size".
>
> Is there any way to resize the cluster so that the chart plots only the
> points
> I supply, without redundent zeros or truncations?
>
> Thanks for your help.
>
> Brett Patterson
>
> --
>
____________________________________________________________________________
> Dr Brett Patterson, BSc Hons (Western Aust.), PhD (Cantab.), CPhys,
MInstP.
>
> Optical+Biomedical Engineering Laboratory _--_|\
> Electrical & Electronic Engineering / \
> The University of Western Australia *_.--._/
> Nedlands, WA 6907, AUSTRALIA v
>
> Tel: +61 8 9380 2317 Fax: +61 8 9380
1065
> mailto:Brett.Patterson@uwa.edu.au
http://www.ee.uwa.edu.au/~obel
>
____________________________________________________________________________
>
>
>
>
>
>
>
>
>
0 Kudos
Message 2 of 3
(2,709 Views)
Alternatively, you can also fix your cluster to a maximum fixed size and
filled unused entries with NaN.
NaN is "Not a number". NaN entries are not plotted in graphs. You obtain a
NaN typing "NaN" in a float constant or control.



Jean-Pierre Drolet a �crit dans le message :
38cfcb4f@newsgroups.ni.com...
> Hello
>
> Wire a 2D array to the chart terminal:
> colums: number of graphs
> lines:number of points to add to each graph
>
> But when you change the number of colums from one write to the next, the
> graph is reset. Read, resize and rewrite chart attribute node "History
data"
> if you want to dynamically change the number of graph while keeping entire
> history.
>
>
> --
> Jean-Pierre Drolet
> Scientech R&D inc
> Trois-Rivieres-Ouest (Quebec)
> CANADA G8Z 4H1
>
>
> Brett Patterson a �crit dans le message :
> 8ankf5$9tj$1@enyo.uwa.edu.au...
> > Hello,
> >
> > I have a chart that periodically plots a new array of data points.
> > The array is passed through an "array to cluster" function before
> > being sent to the chart.
> >
> > Problem is that the size of my array can change, but the "array to
> cluster"
> > function has a default cluster size that cannot be changed
> programmatically.
> > This means that, if initially my array size is only 7, that everything
> works
> > OK,
> > but if the array size decreases to 4, the cluster size remains at 7 and
> the
> > chart
> > plots redundent zero values that are not real data. Also, if the array
> size
> > is ever
> > greater than 9, the "array to cluster" truncates the data to 9 elements.
> The
> > "array
> > to cluster" function seems to remember the maximum size of the array,
> fills
> > unused elements with zeros, and truncates elements beyond its "default
> > size".
> >
> > Is there any way to resize the cluster so that the chart plots only the
> > points
> > I supply, without redundent zeros or truncations?
> >
> > Thanks for your help.
> >
> > Brett Patterson
> >
> > --
> >
>
____________________________________________________________________________
> > Dr Brett Patterson, BSc Hons (Western Aust.), PhD (Cantab.), CPhys,
> MInstP.
> >
> > Optical+Biomedical Engineering Laboratory _--_|\
> > Electrical & Electronic Engineering / \
> > The University of Western Australia *_.--._/
> > Nedlands, WA 6907, AUSTRALIA v
> >
> > Tel: +61 8 9380 2317 Fax: +61 8 9380
> 1065
> > mailto:Brett.Patterson@uwa.edu.au
> http://www.ee.uwa.edu.au/~obel
> >
>
____________________________________________________________________________
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
0 Kudos
Message 3 of 3
(2,709 Views)