These are important, e.g., to display a stereo signal in a single graph. Purr-Data displays these all right if I create them in another Pd flavor, and the graph canvas properties dialog also lets me delete individual arrays associated with a graph. But there doesn't seem to be a way to create a graph with multiple arrays, or add an array to an existing graph in its properties. Or am I missing something?
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
The only way to add an array to a graph right now seems to be to paste a line like #X array array2 1000 float 2 black black; into the graph's canvas using "Paste from Clipboard". But that will be hard for a newbie to discover. ;-)
Ivica and I have run into numerous problems with multi-array graphs. It's difficult to ensure they display properly, especially if the user gives them different sizes. Plus you can always stack one graph on top of another to get the same behavior.
Since the canvas dialog already has support for setting the state for multiple arrays, I guess I'm not against someone porting the "Create in last graph" checkbox. (Though even that is a bad interface-- what if you want to create it in the next to last graph, or first graph? Etc.)
But I should warn you that the garray code is an enormous hairball...
Ivica and I have run into numerous problems with multi-array graphs.
That doesn't change the fact that it's a much-needed functionality.
Plus you can always stack one graph on top of another to get the same behavior.
That's not really practical. The graph labels get in the way, and there doesn't seem to be a way to disable them, at least not from the GUI. It also makes it cumbersome to access the properties of the individual graphs.
I'm not against someone porting the "Create in last graph" checkbox. (Though even that is a bad interface-- what if you want to create it in the next to last graph, or first graph? Etc.)
I agree that the "Create in last graph" checkbox isn't really a good solution. But we might just add an "add an array" checkbox to the properties dialog, just like there is a "delete this array" checkbox in the multi-array properties. Or even just an "Add array" option in the right-click menu, if that's possible.
Is there a message I can send to a graph canvas to have it add an array to it? Then I might be able to work out the details of the GUI interface myself.
I suppose you could send a list of available graphs on the current canvas to the "New Array" dialog, then let the user pick one. You could abuse the otherflag for this-- maybe "-1" for new array, and positive integers for the index of the graph to create it in.
As far as a message-- there's a sequence of messages you can send to dynamically instantiate an array, but I can't remember what they are.
Thanks a lot for this! Works like a charm now. We can leave the creation of secondary arrays for another time, so I marked this as fixed in #220 (closed) (Release blockers).