diff --git a/chaco/array_plot_data.py b/chaco/array_plot_data.py index c487adec8..0dd04378d 100644 --- a/chaco/array_plot_data.py +++ b/chaco/array_plot_data.py @@ -122,6 +122,11 @@ def set_data(self, name, new_data, generate_name=False): ------- The name under which the array was set. + See Also + -------- + update_data: Use if needing to set multiple ArrayPlotData entries at + once, for example because new arrays' dimensions change and + updating one at a time would break an existing Plot. """ if not self.writable: return None @@ -135,12 +140,19 @@ def set_data(self, name, new_data, generate_name=False): def update_data(self, *args, **kwargs): - """ Sets the specified array as the value for either the specified - name or a generated name. + """ Updates any number of arrays before triggering a `data_changed` + event. + + Useful to set multiple ArrayPlotData entries at once, for example + because new arrays' dimensions change and updating one at a time would + break an existing Plot. - Implements AbstractPlotData's update_data() method. This method has - the same signature as the dictionary update() method. + Note: Implements AbstractPlotData's update_data() method. This method + has the same signature as the dictionary update() method. + See Also + -------- + set_data: Simpler interface to set only 1 entry at a time. """ if not self.writable: return None