-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Milestone
Description
The docstring description of the type parameter for Plot.plot reads:
type : comma-delimited string of plot type
However, I do not see where a comma delimited list of plot types is supported in the code, and the following example fails with error:
ValueError: Unknown plot type: line,scatter
from chaco.api import ArrayPlotData, Plot
from enable.api import ComponentEditor
from traits.api import HasTraits, Instance
from traitsui.api import Item, View
class Demo(HasTraits):
plot = Instance(Plot)
data = Instance(ArrayPlotData)
def _data_default(self):
return ArrayPlotData(
x=[1, 2, 3, 4],
y=[4, 0, 9, 4],
)
def _plot_default(self):
plot = Plot(self.data)
plot.plot(('x', 'y'), type='line,scatter')
return plot
def default_traits_view(self):
return View(
Item('plot', editor=ComponentEditor())
)
if __name__ == '__main__':
Demo().configure_traits()Metadata
Metadata
Assignees
Labels
No labels