Hi,
I ve changed a standard example to display X and Y title.
I see the X but not the Y.
What goes wrong ?
W7 Pro
Python 3.6
Chaco 4.8
Code :
from numpy import linspace, sin
from traits.api import HasTraits, Instance
from traitsui.api import View, Item
from chaco.api import Plot, ArrayPlotData
from enable.api import ComponentEditor
class LinePlot(HasTraits):
plot = Instance(Plot)
traits_view = View(
Item('plot',editor=ComponentEditor(), show_label=False),
width=500, height=500, resizable=True, title="Chaco Plot")
def _plot_default(self):
x = linspace(-14, 14, 100)
y = sin(x) * x**3
plotdata = ArrayPlotData(x=x, y=y)
plot = Plot(plotdata)
plot.plot(("x", "y"), type="line", color="blue")
plot.title = "sin(x) * x^3"
plot.x_axis.title = "X AXIS"
plot.y_axis.title = "Y AXIS"
return plot
if __name__ == "__main__":
LinePlot().configure_traits()