Python 如何调整chaco绘图的大小并删除/隐藏yaxis

Python 如何调整chaco绘图的大小并删除/隐藏yaxis,python,chaco,Python,Chaco,我试图学习一些查科语,但在编辑我创作的情节时遇到了困难。我做了一个网格,有四个图,两个散点图和两个条形图。我希望能够删除图之间的空白,并增加散射图的宽度和减少条形图的宽度。 另外,文档中似乎没有很好地描述更改轴标签之类的简单事情,有人知道我在哪里可以看到一些如何执行这些操作的示例吗 我的代码在下面 from chaco.api import ArrayPlotData, Plot, GridPlotContainer from enable.component_e

我试图学习一些查科语,但在编辑我创作的情节时遇到了困难。我做了一个网格,有四个图,两个散点图和两个条形图。我希望能够删除图之间的空白,并增加散射图的宽度和减少条形图的宽度。 另外,文档中似乎没有很好地描述更改轴标签之类的简单事情,有人知道我在哪里可以看到一些如何执行这些操作的示例吗

我的代码在下面

from chaco.api import ArrayPlotData, Plot, GridPlotContainer                
from enable.component_editor import ComponentEditor
from traits.api import HasTraits, Instance
from traitsui.api import View, Item
import numpy as np
import glob
import pickle




class ArrayPlot(HasTraits):

    plot = Instance(GridPlotContainer)

    traits_view = View(Item('plot', editor = ComponentEditor(), show_label = False),
                       width = 1000, height = 500,
                       resizable = True, title = "Joekulheimar")


    def __init__(self, time, slow, baz, *args, **kw):

        super(ArrayPlot, self).__init__(*args, **kw)

        # Create a GridContainer to hold all of our plots: 2 rows, 2 columns
        container = GridPlotContainer(shape=(2,2),
                                      spacing=(10.0,0.0),
                                      valign='top',
                                      bgcolor='white')

        ## plot baz data
        # time series
        plotdata1 = ArrayPlotData(x=time,y=baz)
        plot1 = Plot(plotdata1)
        plot1.plot(("x","y"), type = "scatter", color = "blue", marker='circle')
        plot1.set(width=30.0, height=20.0, resizable='hv')  # does nothing!!!!!!!!!


        # histogram
        hist, bins = np.histogram(baz, bins=30, density=True)
        center = (bins[:-1] + bins[1:]) / 2
        width = center[1]-center[0]
        plotdata2 = ArrayPlotData(x=center, y=hist)
        plot2 = Plot(plotdata2, orientation='v', axis_line_visible=False, resizable = 'hv')
        plot2.plot(("x","y"), type = "bar", color = "blue", bar_width=width,
                   fill_color='green')
        plot2.range2d.y_range.low = 0

        ## plot slow data
        # time series
        plotdata3 = ArrayPlotData(x=time,y=slow)
        plot3 = Plot(plotdata3)
        plot3.plot(("x","y"), type = "scatter", color = "blue", marker='circle')    



        # histogram
        hist, bins = np.histogram(slow, bins=30, density=True)
        center = (bins[:-1] + bins[1:]) / 2
        width = center[1]-center[0]
        plotdata4 = ArrayPlotData(x=center,y=hist)
        plot4 = Plot(plotdata4, orientation='v', axis_line_visible=False, resizable = 'hv')
        xlim=plot4.index_mapper.range
        plot4.plot(("x","y"), type = "bar", color = "blue", bar_width=width,
                   fill_color='green')   
        plot4.range2d.y_range.low = 0


        # Add to the grid container
        container.add(plot1, plot2, plot3, plot4)
        self.plot = container




TIME = np.linspace(0, 1000, 1000)
SLOW = np.random.randn(1000)
BAZ = np.random.randn(1000)

grid_plot = ArrayPlot(TIME, SLOW, BAZ)
grid_plot.configure_traits()

文件确实是查科的弱点。我通常会在办公室里找到我需要的东西。