• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python canvas.Canvas类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中toyplot.canvas.Canvas的典型用法代码示例。如果您正苦于以下问题:Python Canvas类的具体用法?Python Canvas怎么用?Python Canvas使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: matrix

def matrix(
        matrix,
        label=None,
        step=1,
        colormap=None,
        palette=None,
        width=None,
        height=None,
        canvas_style=None):
    """Convenience function to create a matrix visualization in a single call.

    See :meth:`toyplot.canvas.Canvas.matrix`, and :class:`toyplot.canvas.Canvas` for parameter descriptions.

    Returns
    -------
    canvas: :class:`toyplot.canvas.Canvas`
      A new canvas object.
    table: :class:`toyplot.axes.Table`
      A new set of table axes that fill the canvas.
    """
    canvas = Canvas(width=width, height=height, style=canvas_style)
    table = canvas.matrix(
        matrix=matrix,
        label=label,
        step=step,
        colormap=colormap,
        palette=palette)
    return canvas, table
开发者ID:melund,项目名称:toyplot,代码行数:28,代码来源:__init__.py


示例2: table

def table(
        data=None,
        rows=None,
        columns=None,
        hrows=None,
        brows=None,
        lcols=None,
        rcols=None,
        label=None,
        width=None,
        height=None,
        canvas_style=None):
    """Convenience function to create a table visualization in a single call.

    See :meth:`toyplot.canvas.Canvas.table`, and :class:`toyplot.canvas.Canvas` for parameter descriptions.

    Returns
    -------
    canvas: :class:`toyplot.canvas.Canvas`
      A new canvas object.
    table: :class:`toyplot.axes.Table`
      A new set of table axes that fill the canvas.
    """
    canvas = Canvas(width=width, height=height, style=canvas_style)
    table = canvas.table(
        data=data,
        rows=rows,
        columns=columns,
        hrows=hrows,
        brows=brows,
        lcols=lcols,
        rcols=rcols,
        label=label)
    return canvas, table
开发者ID:melund,项目名称:toyplot,代码行数:34,代码来源:__init__.py


示例3: image

def image(
        data,
        height=None,
        margin=0,
        width=None,
    ): # pragma: no cover
    """Convenience function for displaying an image in a single call.

    See :meth:`toyplot.canvas.Canvas.image`, and :class:`toyplot.canvas.Canvas`
    for parameter descriptions.

    Returns
    -------
    canvas: :class:`toyplot.canvas.Canvas`
        A new canvas object.
    mark: :class:`toyplot.mark.Image`
        The new image mark.
    """
    canvas = Canvas(
        height=height,
        width=width,
        )
    mark = canvas.image(
        data=data,
        margin=margin,
        )
    return canvas, mark
开发者ID:sandialabs,项目名称:toyplot,代码行数:27,代码来源:__init__.py


示例4: matrix

def matrix(
        data,
        blabel=None,
        blocator=None,
        bshow=None,
        colorshow=False,
        filename=None,
        height=None,
        label=None,
        llabel=None,
        llocator=None,
        lshow=None,
        margin=50,
        rlabel=None,
        rlocator=None,
        rshow=None,
        step=1,
        tlabel=None,
        tlocator=None,
        tshow=None,
        width=None,
    ):
    """Convenience function to create a matrix visualization in a single call.

    See :meth:`toyplot.canvas.Canvas.matrix`, and
    :class:`toyplot.canvas.Canvas` for parameter descriptions.

    Returns
    -------
    canvas: :class:`toyplot.canvas.Canvas`
      A new canvas object.
    table: :class:`toyplot.coordinates.Table`
      A new set of table axes that fill the canvas.
    """
    canvas = Canvas(
        height=height,
        width=width,
        )
    axes = canvas.matrix(
        blabel=blabel,
        blocator=blocator,
        bshow=bshow,
        colorshow=colorshow,
        data=data,
        filename=filename,
        label=label,
        llabel=llabel,
        llocator=llocator,
        lshow=lshow,
        margin=margin,
        rlabel=rlabel,
        rlocator=rlocator,
        rshow=rshow,
        step=step,
        tlabel=tlabel,
        tlocator=tlocator,
        tshow=tshow,
        )
    return canvas, axes
开发者ID:sandialabs,项目名称:toyplot,代码行数:59,代码来源:__init__.py


示例5: scatterplot

def scatterplot(a, b=None, along="x", color=None, colormap=None, palette=None, marker="o", size=20, fill=None, fill_colormap=None, fill_palette=None, opacity=1.0, title=None, style=None, mstyle=None, mlstyle=None, xmin=None, xmax=None, ymin=None, ymax=None, show=True, xshow=True, yshow=True, label=None, xlabel=None, ylabel=None, xscale="linear", yscale="linear", padding=10, width=None, height=None, canvas_style=None):
  """Convenience function for creating a scatter plot in a single call.

  See :meth:`toyplot.axes.Cartesian.scatterplot`, :meth:`toyplot.canvas.Canvas.axes`, and :class:`toyplot.canvas.Canvas` for parameter descriptions.

  Returns
  -------
  canvas: :class:`toyplot.canvas.Canvas`
    A new canvas object.
  axes: :class:`toyplot.axes.Cartesian`
    A new set of 2D axes that fill the canvas.
  mark: :class:`toyplot.mark.Plot`
    The new scatter plot mark.
  """
  canvas = Canvas(width=width, height=height, style=canvas_style)
  axes = canvas.axes(xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, show=show, xshow=xshow, yshow=yshow, label=label, xlabel=xlabel, ylabel=ylabel, xscale=xscale, yscale=yscale, padding=padding)
  mark = axes.scatterplot(a=a, b=b, along=along, color=color, colormap=colormap, palette=palette, marker=marker, size=size, fill=fill, fill_colormap=fill_colormap, fill_palette=fill_palette, opacity=opacity, title=title, style=style, mstyle=mstyle, mlstyle=mlstyle)
  return canvas, axes, mark
开发者ID:snowind,项目名称:toyplot,代码行数:18,代码来源:__init__.py


示例6: fill

def fill(a, b=None, c=None, along="x", baseline=None, fill=None, colormap=None, palette=None, opacity=1.0, title=None, style=None, xmin=None, xmax=None, ymin=None, ymax=None, show=True, xshow=True, yshow=True, label=None, xlabel=None, ylabel=None, xscale="linear", yscale="linear", padding=10, width=None, height=None, canvas_style=None):
  """Convenience function for creating a fill plot in a single call.

  See :meth:`toyplot.axes.Cartesian.fill`, :meth:`toyplot.canvas.Canvas.axes`, and :class:`toyplot.canvas.Canvas` for parameter descriptions.

  Returns
  -------
  canvas: :class:`toyplot.canvas.Canvas`
    A new canvas object.
  axes: :class:`toyplot.axes.Cartesian`
    A new set of 2D axes that fill the canvas.
  mark: :class:`toyplot.mark.FillBoundaries` or :class:`toyplot.mark.FillMagnitudes`
    The new bar mark.
  """
  canvas = Canvas(width=width, height=height, style=canvas_style)
  axes = canvas.axes(xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, show=show, xshow=xshow, yshow=yshow, label=label, xlabel=xlabel, ylabel=ylabel, xscale=xscale, yscale=yscale, padding=padding)
  mark = axes.fill(a=a, b=b, c=c, along=along, baseline=baseline, fill=fill, colormap=colormap, palette=palette, opacity=opacity, title=title, style=style)
  return canvas, axes, mark
开发者ID:snowind,项目名称:toyplot,代码行数:18,代码来源:__init__.py


示例7: table

def table(
        data=None,
        brows=None,
        columns=None,
        filename=None,
        height=None,
        label=None,
        lcolumns=None,
        margin=50,
        rcolumns=None,
        rows=None,
        trows=None,
        width=None,
    ):
    """Convenience function to create a table visualization in a single call.

    See :meth:`toyplot.canvas.Canvas.table`, and :class:`toyplot.canvas.Canvas`
    for parameter descriptions.

    Returns
    -------
    canvas: :class:`toyplot.canvas.Canvas`
      A new canvas object.
    table: :class:`toyplot.coordinates.Table`
      A new set of table axes that fill the canvas.
    """
    canvas = Canvas(
        height=height,
        width=width,
        )
    axes = canvas.table(
        brows=brows,
        columns=columns,
        data=data,
        filename=filename,
        label=label,
        lcolumns=lcolumns,
        margin=margin,
        rcolumns=rcolumns,
        rows=rows,
        trows=trows,
        )
    return canvas, axes
开发者ID:sandialabs,项目名称:toyplot,代码行数:43,代码来源:__init__.py


示例8: plot

def plot(
    a,
    b=None,
    along="x",
    color=None,
    stroke_width=2.0,
    opacity=1.0,
    title=None,
    marker=None,
    area=None,
    size=None,
    mfill=None,
    mopacity=1.0,
    mtitle=None,
    style=None,
    mstyle=None,
    mlstyle=None,
    filename=None,
    aspect=None,
    xmin=None,
    xmax=None,
    ymin=None,
    ymax=None,
    show=True,
    xshow=True,
    yshow=True,
    label=None,
    xlabel=None,
    ylabel=None,
    xscale="linear",
    yscale="linear",
    padding=10,
    width=None,
    height=None,
):
    """Convenience function for creating a line plot in a single call.

    See :meth:`toyplot.axes.Cartesian.plot`,
    :meth:`toyplot.canvas.Canvas.axes`, and :class:`toyplot.canvas.Canvas` for
    parameter descriptions.

    Returns
    -------
    canvas: :class:`toyplot.canvas.Canvas`
      A new canvas object.
    axes: :class:`toyplot.axes.Cartesian`
      A new set of 2D axes that fill the canvas.
    mark: :class:`toyplot.mark.Plot`
      The new plot mark.
    """
    canvas = Canvas(width=width, height=height)
    axes = canvas.axes(
        aspect=aspect,
        xmin=xmin,
        xmax=xmax,
        ymin=ymin,
        ymax=ymax,
        show=show,
        xshow=xshow,
        yshow=yshow,
        label=label,
        xlabel=xlabel,
        ylabel=ylabel,
        xscale=xscale,
        yscale=yscale,
        padding=padding,
    )
    mark = axes.plot(
        a=a,
        b=b,
        along=along,
        color=color,
        stroke_width=stroke_width,
        opacity=opacity,
        title=title,
        marker=marker,
        area=area,
        size=size,
        mfill=mfill,
        mopacity=mopacity,
        mtitle=mtitle,
        style=style,
        mstyle=mstyle,
        mlstyle=mlstyle,
        filename=filename,
    )
    return canvas, axes, mark
开发者ID:tetrafolium,项目名称:toyplot,代码行数:87,代码来源:__init__.py


示例9: graph

def graph(
    a,
    b=None,
    c=None,
    olayout=None,
    layout=None,
    along="x",
    vlabel=None,
    vcoordinates=None,
    vcolor=None,
    vmarker="o",
    varea=None,
    vsize=None,
    vopacity=1.0,
    vtitle=None,
    vstyle=None,
    vlstyle=None,
    vlshow=True,
    ecolor=None,
    ewidth=1.0,
    eopacity=1.0,
    estyle=None,
    padding=20,
    width=None,
    height=None,
):  # pragma: no cover
    """Convenience function for creating a graph plot in a single call.

    See :meth:`toyplot.axes.Cartesian.graph`,
    :meth:`toyplot.canvas.Canvas.axes`, and :class:`toyplot.canvas.Canvas` for
    parameter descriptions.

    Returns
    -------
    canvas: :class:`toyplot.canvas.Canvas`
        A new canvas object.
    axes: :class:`toyplot.axes.Cartesian`
        A new set of 2D axes that fill the canvas.
    mark: :class:`toyplot.mark.Graph`
        The new graph mark.
    """
    canvas = Canvas(width=width, height=height)
    axes = canvas.axes(aspect="fit-range", show=False, padding=padding)
    mark = axes.graph(
        a=a,
        b=b,
        c=c,
        olayout=olayout,
        layout=layout,
        along=along,
        vlabel=vlabel,
        vcoordinates=vcoordinates,
        vcolor=vcolor,
        vmarker=vmarker,
        varea=varea,
        vsize=vsize,
        vopacity=vopacity,
        vtitle=vtitle,
        vstyle=vstyle,
        vlstyle=vlstyle,
        vlshow=vlshow,
        ecolor=ecolor,
        ewidth=ewidth,
        eopacity=eopacity,
        estyle=estyle,
    )
    return canvas, axes, mark
开发者ID:tetrafolium,项目名称:toyplot,代码行数:67,代码来源:__init__.py


示例10: scatterplot

def scatterplot(
        a,
        b=None,
        along="x",
        area=None,
        aspect=None,
        color=None,
        filename=None,
        height=None,
        hyperlink=None,
        label=None,
        margin=50,
        marker="o",
        mlstyle=None,
        mstyle=None,
        opacity=1.0,
        padding=10,
        show=True,
        size=None,
        title=None,
        width=None,
        xlabel=None,
        xmax=None,
        xmin=None,
        xscale="linear",
        xshow=True,
        ylabel=None,
        ymax=None,
        ymin=None,
        yscale="linear",
        yshow=True,
    ):
    """Convenience function for creating a scatter plot in a single call.

    See :meth:`toyplot.coordinates.Cartesian.scatterplot`,
    :meth:`toyplot.canvas.Canvas.cartesian`, and :class:`toyplot.canvas.Canvas` for
    parameter descriptions.

    Returns
    -------
    canvas: :class:`toyplot.canvas.Canvas`
      A new canvas object.
    axes: :class:`toyplot.coordinates.Cartesian`
      A new set of 2D axes that fill the canvas.
    mark: :class:`toyplot.mark.Point`
      The new scatterplot mark.
    """
    canvas = Canvas(
        height=height,
        width=width,
        )
    axes = canvas.cartesian(
        aspect=aspect,
        label=label,
        margin=margin,
        padding=padding,
        show=show,
        xlabel=xlabel,
        xmax=xmax,
        xmin=xmin,
        xscale=xscale,
        xshow=xshow,
        ylabel=ylabel,
        ymax=ymax,
        ymin=ymin,
        yscale=yscale,
        yshow=yshow,
        )
    mark = axes.scatterplot(
        a=a,
        b=b,
        along=along,
        area=area,
        color=color,
        filename=filename,
        hyperlink=hyperlink,
        marker=marker,
        mlstyle=mlstyle,
        mstyle=mstyle,
        opacity=opacity,
        size=size,
        title=title,
        )
    return canvas, axes, mark
开发者ID:sandialabs,项目名称:toyplot,代码行数:84,代码来源:__init__.py


示例11: bars

def bars(
        a,
        b=None,
        c=None,
        along="x",
        baseline="stacked",
        color=None,
        filename=None,
        height=None,
        hyperlink=None,
        label=None,
        margin=50,
        opacity=1.0,
        padding=10,
        show=True,
        style=None,
        title=None,
        width=None,
        xlabel=None,
        xmax=None,
        xmin=None,
        xscale="linear",
        xshow=True,
        ylabel=None,
        ymax=None,
        ymin=None,
        yscale="linear",
        yshow=True,
    ):
    """Convenience function for creating a bar plot in a single call.

    See :meth:`toyplot.coordinates.Cartesian.bars`,
    :meth:`toyplot.canvas.Canvas.cartesian`, and :class:`toyplot.canvas.Canvas` for
    parameter descriptions.

    Returns
    -------
    canvas: :class:`toyplot.canvas.Canvas`
      A new canvas object.
    axes: :class:`toyplot.coordinates.Cartesian`
      A new set of 2D axes that fill the canvas.
    mark: :class:`toyplot.mark.BarMagnitudes` or :class:`toyplot.mark.BarBoundaries`
      The new bar mark.
    """
    canvas = Canvas(width=width, height=height)
    axes = canvas.cartesian(
        label=label,
        margin=margin,
        padding=padding,
        show=show,
        xlabel=xlabel,
        xmax=xmax,
        xmin=xmin,
        xscale=xscale,
        xshow=xshow,
        ylabel=ylabel,
        ymax=ymax,
        ymin=ymin,
        yscale=yscale,
        yshow=yshow,
        )

    mark = axes.bars(
        a=a,
        b=b,
        c=c,
        along=along,
        baseline=baseline,
        color=color,
        filename=filename,
        hyperlink=hyperlink,
        opacity=opacity,
        style=style,
        title=title,
        )
    return canvas, axes, mark
开发者ID:sandialabs,项目名称:toyplot,代码行数:76,代码来源:__init__.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python model.Model类代码示例发布时间:2022-05-27
下一篇:
Python tox.cmdline函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap