当前位置: 首页>>代码示例>>Python>>正文


Python bokeh.layouts方法代码示例

本文整理汇总了Python中bokeh.layouts方法的典型用法代码示例。如果您正苦于以下问题:Python bokeh.layouts方法的具体用法?Python bokeh.layouts怎么用?Python bokeh.layouts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bokeh的用法示例。


在下文中一共展示了bokeh.layouts方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _get_figure

# 需要导入模块: import bokeh [as 别名]
# 或者: from bokeh import layouts [as 别名]
def _get_figure(col):
    """Gets the bokeh.plotting.figure from a bokeh.layouts.column."""

    from bokeh.layouts import column
    from bokeh.plotting import figure

    for children in col.children:
        if isinstance(children, type(figure())):
            return children
        elif isinstance(children, type(column())):
            return _get_figure(children) 
开发者ID:PatrikHlobil,项目名称:Pandas-Bokeh,代码行数:13,代码来源:geoplot.py

示例2: line

# 需要导入模块: import bokeh [as 别名]
# 或者: from bokeh import layouts [as 别名]
def line(self, x=None, y=None, **kwargs):
        """
        Plot DataFrame columns as lines.

        This function is useful to plot lines using DataFrame's values
        as coordinates.

        Parameters
        ----------
        x : int or str, optional
            Columns to use for the horizontal axis.
            Either the location or the label of the columns to be used.
            By default, it will use the DataFrame indices.
        y : int, str, or list of them, optional
            The values to be plotted.
            Either the location or the label of the columns to be used.
            By default, it will use the remaining DataFrame numeric columns.
        **kwds
            Keyword arguments to pass on to :meth:`pandas.DataFrame.plot_bokeh`.

        Returns
        -------
        
        Bokeh.plotting.figure or Bokeh.layouts.row

        Examples
        --------

        .. plot::
            :context: close-figs

            The following example shows the populations for some animals
            over the years.

            >>> df = pd.DataFrame({
            ...    'pig': [20, 18, 489, 675, 1776],
            ...    'horse': [4, 25, 281, 600, 1900]
            ...    }, index=[1990, 1997, 2003, 2009, 2014])
            >>> lines = df.plot_bokeh.line()


        .. plot::
            :context: close-figs

            The following example shows the relationship between both
            populations.

            >>> lines = df.plot_bokeh.line(x='pig', y='horse')
        """
        return self(kind="line", x=x, y=y, **kwargs) 
开发者ID:PatrikHlobil,项目名称:Pandas-Bokeh,代码行数:52,代码来源:plot.py

示例3: step

# 需要导入模块: import bokeh [as 别名]
# 或者: from bokeh import layouts [as 别名]
def step(self, x=None, y=None, **kwargs):
        """
        Plot DataFrame columns as step lines.

        This function is useful to plot step lines using DataFrame's values
        as coordinates.

        Parameters
        ----------
        x : int or str, optional
            Columns to use for the horizontal axis.
            Either the location or the label of the columns to be used.
            By default, it will use the DataFrame indices.
        y : int, str, or list of them, optional
            The values to be plotted.
            Either the location or the label of the columns to be used.
            By default, it will use the remaining DataFrame numeric columns.
        **kwds
            Keyword arguments to pass on to :meth:`pandas.DataFrame.plot_bokeh`.

        Returns
        -------
        
        Bokeh.plotting.figure or Bokeh.layouts.row

        Examples
        --------

        .. plot::
            :context: close-figs

            The following example shows the populations for some animals
            over the years.

            >>> df = pd.DataFrame({
            ...    'pig': [20, 18, 489, 675, 1776],
            ...    'horse': [4, 25, 281, 600, 1900]
            ...    }, index=[1990, 1997, 2003, 2009, 2014])
            >>> steps = df.plot_bokeh.step()


        .. plot::
            :context: close-figs

            The following example shows the relationship between both
            populations.

            >>> steps = df.plot_bokeh.step(x='pig', y='horse')
        """
        return self(kind="step", x=x, y=y, **kwargs) 
开发者ID:PatrikHlobil,项目名称:Pandas-Bokeh,代码行数:52,代码来源:plot.py

示例4: point

# 需要导入模块: import bokeh [as 别名]
# 或者: from bokeh import layouts [as 别名]
def point(self, x=None, y=None, **kwargs):
        """
        Plot DataFrame columns as points.

        This function is useful to plot lines using DataFrame's values
        as coordinates.

        Parameters
        ----------
        x : int or str, optional
            Columns to use for the horizontal axis.
            Either the location or the label of the columns to be used.
            By default, it will use the DataFrame indices.
        y : int, str, or list of them, optional
            The values to be plotted.
            Either the location or the label of the columns to be used.
            By default, it will use the remaining DataFrame numeric columns.
        **kwds
            Keyword arguments to pass on to :meth:`pandas.DataFrame.plot_bokeh`.

        Returns
        -------
        
        Bokeh.plotting.figure or Bokeh.layouts.row

        Examples
        --------

        .. plot::
            :context: close-figs

            The following example shows the populations for some animals
            over the years.

            >>> df = pd.DataFrame({
            ...    'pig': [20, 18, 489, 675, 1776],
            ...    'horse': [4, 25, 281, 600, 1900]
            ...    }, index=[1990, 1997, 2003, 2009, 2014])
            >>> lines = df.plot_bokeh.point()


        .. plot::
            :context: close-figs

            The following example shows the relationship between both
            populations.

            >>> lines = df.plot_bokeh.point(x='pig', y='horse')
        """
        return self(kind="point", x=x, y=y, **kwargs) 
开发者ID:PatrikHlobil,项目名称:Pandas-Bokeh,代码行数:52,代码来源:plot.py


注:本文中的bokeh.layouts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。