<commit_before>
from numpy import linspace, pi, sin, tan

from enthought.traits.api import HasTraits, Instance
from enthought.traits.ui.api import Item, Group, View

from enthought.chaco2.chaco2_plot_container_editor import PlotContainerEditor
from enthought.chaco2.api import Plot, AbstractPlotData, ArrayPlotData
from enthought.chaco2.tools.api import PanTool, SimpleZoom


class TabbedPlots(HasTraits):

    data = Instance(AbstractPlotData)

    plot1 = Instance(Plot)
    plot2 = Instance(Plot)

    view = View(Group(
                   Item('plot1', editor=PlotContainerEditor(), show_label=False),
                   Item('plot2', editor=PlotContainerEditor(), show_label=False),
                   layout="tabbed"),
                width=800,
                height=600,
                resizable=True)
                


    def create_plots(self):
        p1 = Plot(self.data)
        p1.plot(("x", "y1"), name="sin plot", color="red")
        p1.tools.append(PanTool(p1))
        p1.overlays.append(SimpleZoom(p1))

        p2 = Plot(self.data)
        p2.plot(("x", "y2"), name="tan plot", color="blue")<commit_msg>Added 'dock' style information to the 'tabbed_plots' Chaco demo so that people will have a better idea of how to create restructurable Traits UI's. This change is based on some issues reported by a couple of users.<commit_after>
from numpy import linspace, pi, sin, tan

from enthought.traits.api import HasTraits, Instance
from enthought.traits.ui.api import Item, Group, View

from enthought.chaco2.chaco2_plot_container_editor import PlotContainerEditor
from enthought.chaco2.api import Plot, AbstractPlotData, ArrayPlotData
from enthought.chaco2.tools.api import PanTool, SimpleZoom


class TabbedPlots(HasTraits):

    data = Instance(AbstractPlotData)

    plot1 = Instance(Plot)
    plot2 = Instance(Plot)

    view = View(Group(
                   Item('plot1', editor=PlotContainerEditor(), 
                        dock='tab', show_label=False),
                   Item('plot2', editor=PlotContainerEditor(), 
                        dock='tab', show_label=False),
                   layout="tabbed"),
                width=800,
                height=600,
                resizable=True)
                


    def create_plots(self):
        p1 = Plot(self.data)
        p1.plot(("x", "y1"), name="sin plot", color="red")
        p1.tools.append(PanTool(p1))
        p1.overlays.append(SimpleZoom(p1))

        p2 = Plot(self.data)
        p2.plot(("x", "y2"), name="tan plot", color="blue")
{'fraction_non_alphanumeric': 0.10944290794152509, 'fraction_numerical': 0.018964836033188465, 'mean_word_length': 2.6963503649635037, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6694178', 'n_tokens_mistral': 803, 'n_tokens_neox': 750, 'n_words': 181}