當前位置: 首頁>>代碼示例>>Python>>正文


Python io.show方法代碼示例

本文整理匯總了Python中bokeh.io.show方法的典型用法代碼示例。如果您正苦於以下問題:Python io.show方法的具體用法?Python io.show怎麽用?Python io.show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在bokeh.io的用法示例。


在下文中一共展示了io.show方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: show

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def show(self):
        """Display a figure (called by backtrader)."""
         # as the plot() function only created the figures and the columndatasources with no data -> now we fill it
        for idx in range(len(self.figurepages)):
            model = self.generate_model(idx)

            if self.p.output_mode in ['show', 'save']:
                if self._iplot:
                    css = self._output_stylesheet()
                    display(HTML(css))
                    show(model)
                else:
                    filename = self._output_plot_file(model, idx, self.p.filename)
                    if self.p.output_mode == 'show':
                        view(filename)
            elif self.p.output_mode == 'memory':
                pass
            else:
                raise RuntimeError(f'Invalid parameter "output_mode" with value: {self.p.output_mode}')

        self._reset() 
開發者ID:verybadsoldier,項目名稱:backtrader_plotting,代碼行數:23,代碼來源:bokeh.py

示例2: pie_b

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def pie_b(df):
    # df.loc[df['pop'] < 2.e6, 'country'] = 'Other countries' # Represent only large countries
    fig = px.pie(df, values='parkClassFre', names='parkClass', title=' ',color_discrete_sequence=px.colors.sequential.RdBu)
    
    # Spectral11 = ("#5e4fa2", "#3288bd", "#66c2a5", "#abdda4", "#e6f598", "#ffffbf", "#fee08b", "#fdae61", "#f46d43", "#d53e4f", "#9e0142","#fc8d59")
    # fig.update_traces(textfont_size=15,textinfo='label+percent',) #textposition='inside', textinfo='percent+label'
    fig.update_layout(
        # width=200,height=200,
        # title="Plot Title",
        # xaxis_title="x Axis Title",
        # yaxis_title="y Axis Title",
        font=dict(
            family='SimHei', #'Times New Roman'
            size=15,
            # color="#7f7f7f"
        ),
       )
    fig.show()

#計算百分比_地表覆蓋
#'classi_count','cla_treeCanopy', 'cla_grassShrub','cla_bareSoil', 'cla_buildings', 'cla_roadsRailraods', 'cla_otherPavedSurfaces','cla_water', 
開發者ID:richieBao,項目名稱:python-urbanPlanning,代碼行數:23,代碼來源:parkDataVisulization.py

示例3: plot

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def plot(self, **kwargs) -> Tuple[figure, LayoutDOM]:
        """
        Build and plot a process tree.

        Parameters
        ----------
        schema : ProcSchema, optional
            The data schema to use for the data set, by default None
            (if None the schema is inferred)
        output_var : str, optional
            Output variable for selected items in the tree,
            by default None
        legend_col : str, optional
            The column used to color the tree items, by default None
        show_table: bool
            Set to True to show a data table, by default False.

        Other Parameters
        ----------------
        height : int, optional
            The height of the plot figure
            (the default is 700)
        width : int, optional
            The width of the plot figure (the default is 900)
        title : str, optional
            Title to display (the default is None)

        Returns
        -------
        Tuple[figure, LayoutDOM]:
            figure - The main bokeh.plotting.figure
            Layout - Bokeh layout structure.

        """
        return build_and_show_process_tree(data=self._df, **kwargs) 
開發者ID:microsoft,項目名稱:msticpy,代碼行數:37,代碼來源:process_tree.py

示例4: show

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def show(self):
        if len(self.figures) > 0:
            plot = column(*self.figures)
            show(plot) 
開發者ID:eladhoffer,項目名稱:bigBatch,代碼行數:6,代碼來源:utils.py

示例5: prepare_f_help_source

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def prepare_f_help_source(f):
    data = dict(phase=[(np.max(f.time) - np.min(f.time)) * 0.98 + np.min(f.time)],
                flux=[(np.max(f.flux) - np.min(f.flux)) * 0.98 + np.min(f.flux)],
                helpme=['?'],
                help=["""
                        <div style="width: 375px;">
                            <div style="height: 190px;">
                            </div>
                            <div>
                                <span style="font-size: 12px; font-weight: bold;">Folded Light Curve</span>
                            </div>
                            <div>
                                <span style="font-size: 11px;"">This panel shows the folded light curve,
                                using the period currently selected in the BLS panel [left], indicated by the red line.
                                The transit model is show in red, and duration of the transit model
                                is given by the duration slider below. Update the slider to change the duration.
                                The period and transit midpoint values of the model are given above this panel.</span>
                                <br></br>
                                <span style="font-size: 11px;"">If the folded transit looks like a near miss of
                                the true period, try zooming in on the peak in the BLS Periodogram panel [right]
                                with the Box Zoom tool. This will increase the resolution of the peak, and provide
                                a better period solution. You can also vary the transit duration, for a better fit.
                                If the transit model is too shallow, it may be that you have selected a harmonic.
                                Look in the BLS Periodogram for a peak at (e.g. 0.25x, 0.5x, 2x, 4x the current period etc).</span>
                            </div>
                        </div>
                """])
    return ColumnDataSource(data=data) 
開發者ID:KeplerGO,項目名稱:lightkurve,代碼行數:30,代碼來源:interact_bls.py

示例6: show

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def show(self):
        return pn.layout.Column(self.widgets, self.pnplot) 
開發者ID:DeniseCaiLab,項目名稱:minian,代碼行數:4,代碼來源:visualization.py

示例7: _update_plot

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def _update_plot(self, b):
        clear_output()
        self.get_plot()
        self.show() 
開發者ID:DeniseCaiLab,項目名稱:minian,代碼行數:6,代碼來源:visualization.py

示例8: show

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def show(self, use_datashade=False):
        varrdict = OrderedDict()
        for dim in self.varr_hv.vdims:
            cur_d = self.varr_hv.reindex(vdims=[dim.name])
            fim = fct.partial(self._img, dat=cur_d)
            im = hv.DynamicMap(fim, streams=[self.stream])
            im = regrid(im, height=self._h, width=self._w)
            im = im(plot={'width': self._w, 'height': self._h})
            image = im.relabel(group=dim.name, label='Image')
            varrdict[dim.name] = image
        ma = hv.DynamicMap(self._rgb, streams=[self.stream])
        ma = regrid(ma, height=self._h, width=self._w * 2)
        ma = ma.relabel(label="Match Image")
        ma = ma(plot={'height': self._h, 'width': self._w * 2})
        return hv.Layout(ma + hv.NdLayout(varrdict, kdims=['name'])).cols(1) 
開發者ID:DeniseCaiLab,項目名稱:minian,代碼行數:17,代碼來源:visualization_ply.py

示例9: std_distance

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def std_distance(self):
        self.background('square', fill_alpha=0, line_alpha=1, color='lightgrey')
        self.set_size(N.ACTIVE_DISTANCE, min=0.1)
        self.foreground('square', fill_alpha=1, line_alpha=0, color='black')
        self.show() 
開發者ID:andrewcooke,項目名稱:choochoo,代碼行數:7,代碼來源:calendar.py

示例10: std_distance_climb_direction

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def std_distance_climb_direction(self):
        self.background('circle', fill_alpha=1, line_alpha=0, color='#F0F0F0')
        self.set_size(N.ACTIVE_DISTANCE, min=0.2, max=1.1)
        self.set_palette(N.TOTAL_CLIMB, K2R, gamma=0.3)  # more red
        self.foreground('circle', fill_alpha=1, line_alpha=0)
        self.foreground('circle', fill_alpha=0, line_alpha=1, color='grey')
        self.set_arc(N.DIRECTION, N.ASPECT_RATIO, delta_radius=0.2)
        self.foreground('arc', fill_alpha=0, line_alpha=1, color='black')
        self.show() 
開發者ID:andrewcooke,項目名稱:choochoo,代碼行數:11,代碼來源:calendar.py

示例11: std_distance_fitness_direction

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def std_distance_fitness_direction(self):
        fitness = sorted(like(N._delta(N.FITNESS_ANY), self._df.columns))[0]
        self.background('circle', fill_alpha=0, line_alpha=1, color='lightgrey')
        self.set_size(N.ACTIVE_DISTANCE, min=0.2, max=1.1)
        self.set_palette(fitness, B2R, gamma=0.7)
        self.foreground('circle', fill_alpha=1, line_alpha=0)
        self.set_arc(N.DIRECTION, N.ASPECT_RATIO, delta_radius=0.2)
        self.foreground('arc', fill_alpha=0, line_alpha=1)
        self.show() 
開發者ID:andrewcooke,項目名稱:choochoo,代碼行數:11,代碼來源:calendar.py

示例12: std_group_distance_climb_direction

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def std_group_distance_climb_direction(self):
        n = int(self._df[N.GROUP].max()) + 1
        palette = list(evenly_spaced_hues(n, saturation=0.2, stagger=7))
        self.background('square', fill_alpha=0, line_alpha=1, color='#F0F0F0')
        self.set_palette(N.GROUP, palette)
        self.set_constant(CALENDAR_SIZE, 1)
        self.foreground('square', fill_alpha=1, line_alpha=0)
        self.set_size(N.ACTIVE_DISTANCE, min=0.2, max=0.8)
        self.set_palette(N.TOTAL_CLIMB, K2W, gamma=0.3)
        self.foreground('circle', fill_alpha=1, line_alpha=0)
        self.foreground('circle', fill_alpha=0, line_alpha=1, color='black')
        self.set_arc(N.DIRECTION, N.ASPECT_RATIO, delta_radius=0.2)
        self.foreground('arc', fill_alpha=0, line_alpha=1, color='black')
        self.show() 
開發者ID:andrewcooke,項目名稱:choochoo,代碼行數:16,代碼來源:calendar.py

示例13: show

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def show(self):
        self._plot.add_tools(*self._build_tools(self._df, *self._hover_args))
        show(self._plot) 
開發者ID:andrewcooke,項目名稱:choochoo,代碼行數:5,代碼來源:calendar.py

示例14: readMatLabFig_LandmarkMap

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def readMatLabFig_LandmarkMap(LandmarkMap_fn):
    LandmarkMap=loadmat(LandmarkMap_fn, squeeze_me=True, struct_as_record=False)
    y=loadmat(LandmarkMap_fn)
    print(sorted(LandmarkMap.keys()))
        
    LandmarkMap_dic={} #提取.fig值
    for object_idx in range(LandmarkMap['hgS_070000'].children.children.shape[0]):
        # print(object_idx)
        try:
            X=LandmarkMap['hgS_070000'].children.children[object_idx].properties.XData #good
            Y=LandmarkMap['hgS_070000'].children.children[object_idx].properties.YData 
            LandmarkMap_dic[object_idx]=(X,Y)
        except:
            pass
    
    # print(LandmarkMap_dic)
    fig= plt.figure(figsize=(130,20))
    colors=['#7f7f7f','#d62728','#1f77b4','','','']
    markers=['.','+','o','','','']
    dotSizes=[200,3000,3000,0,0,0]
    linewidths=[2,10,10,0,0,0]
    i=0
    for key in LandmarkMap_dic.keys():
        plt.scatter(LandmarkMap_dic[key][1],LandmarkMap_dic[key][0], s=dotSizes[i],marker=markers[i], color=colors[i],linewidth=linewidths[i])
        i+=1
    plt.tick_params(axis='both',labelsize=80)
    plt.show()
    return LandmarkMap_dic

#03-read PHMI values for evaluation of AVs' on-board lidar navigation 讀取PHMI值
#the PHMI value less than pow(10,-5) is scaled to show clearly------on; the PHMI value larger than pow(10,-5) is scaled to show clearly------on
#數據類型A 
開發者ID:richieBao,項目名稱:python-urbanPlanning,代碼行數:34,代碼來源:showMatLabFig._spatioTemporal.py

示例15: singleBoxplot

# 需要導入模塊: from bokeh import io [as 別名]
# 或者: from bokeh.io import show [as 別名]
def singleBoxplot(array):
    import plotly.express as px
    import pandas as pd
    df=pd.DataFrame(array,columns=["value"])
    fig = px.box(df, y="value",points="all")
    # fig.show() #show in Jupyter
    import plotly
    plotly.offline.plot (fig) #works in spyder

#04-split curve into continuous parts based on the jumping position 使用1維卷積的方法,在曲線跳變點切分曲線 
開發者ID:richieBao,項目名稱:python-urbanPlanning,代碼行數:12,代碼來源:showMatLabFig._spatioTemporal.py


注:本文中的bokeh.io.show方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。