In JMP 11 I am writing a plotting application that allows the user to customize the legends by selecting the grouping column that defines the row states. This requires deleting the old legend (by deleting the parent border box) and adding in a new legend. However I have found that if automatic recalc is set on the bivariate or variability platforms (I hen't tested other platforms), that this will causave a copy of the old legend to re-appear in addition to the new one, when the new one is generated with the FrameBox<<Row Legend command. As more legends are selected, all of the old legends show up. I need automatic recalc on to recalculate trendlines and statistics depending on how data is filtered. Is there a workaround for this? Is there a better way to delete the legend than to say BorderBox<<Delete? I know from the gui you can right click and say "Remove" to a legend...is there a script command equivalent for this?
I have also looked at using the <<color by column on the data table with the "create window with legend" option, and then inserting the legend (table box with strincolbox child) into the plot directly, but this causes the legend to lose its row selection functionality and I cannot seem to add it back in (there must be hidden methods for the table which I cannot access because I also don't know how to put markers into a tablebox in order to do a custom legend).