Skip to content

Y label gets clipped #564

@rahulporuri

Description

@rahulporuri

Problem Description

The Y label in the following example doesn't get displayed while the X label gets displayed.

why-chaco-why

Reproduction Steps:

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()

Expected behavior:

We expect the Y label to be displayed.

OS, Python version: Windows 10 Pro. Python 3.6.0. Chaco 4.8.0. Enable 4.8.1.

Originally reported on the ETS Users Google Group - https://groups.google.com/g/ets-users/c/gHQmFsVMVhw

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions