Beispiel #1
0
	def _plot_default(self):
		self.data = self._data_default()

		plot = Plot(self.data)

		for ii, s_name in enumerate(self._samples):
			color = COLORS[ii % len(self._samples)]
			plot.plot(('bins',s_name), name=s_name,
					   type='filled_line',
					   edge_color=color,
					   face_color=color,
					   alpha=0.5,
					   bgcolor='white',
					   render_style='hold') # render_style determines whether interpolate

		plot.index = plot._get_or_create_datasource('bins') #set index name manually so range selection works
		plot.index_scale = 'log'
		plot.title = 'Fermi Plot'
		plot.padding = 50
		plot.legend.visible = True

		plot.tools.append(PanTool(plot))
		plot.active_tool = RangeSelection(plot)
		plot.overlays.append(RangeSelectionOverlay(component=plot))
		zoom = ZoomTool(component=plot, tool_mode='box', always_on=False)
		plot.overlays.append(zoom)

		return plot	
Beispiel #2
0
    def _plot_default(self):
        self.data = self._data_default()

        plot = Plot(self.data)

        for ii, s_name in enumerate(self._samples):
            color = COLORS[ii % len(self._samples)]
            plot.plot(
                ("bins", s_name),
                name=s_name,
                type="filled_line",
                edge_color=color,
                face_color=color,
                alpha=0.5,
                bgcolor="white",
                render_style="hold",
            )  # render_style determines whether interpolate

        plot.index = plot._get_or_create_datasource("bins")  # set index name manually so range selection works
        plot.index_scale = "log"
        plot.title = "Fermi Plot"
        plot.padding = 50
        plot.legend.visible = True

        plot.tools.append(PanTool(plot))
        plot.active_tool = RangeSelection(plot)
        plot.overlays.append(RangeSelectionOverlay(component=plot))
        zoom = ZoomTool(component=plot, tool_mode="box", always_on=False)
        plot.overlays.append(zoom)

        return plot