pyecharts/pyecharts · scatter_example.py
python logo
def scatter_base() -> Scatter:
    c = (
        Scatter()
        .add_xaxis(Faker.choose())
        .add_yaxis("商家A", Faker.values())
        .set_global_opts(title_opts=opts.TitleOpts(title="Scatter-基本示例"))
    )
    return c
Similar code snippets
1.
pyecharts/pyecharts · scatter_example.py
Match rating: 72.74% · See similar code snippets
python logo
def scatter_visualmap_color() -> Scatter:
    c = (
        Scatter()
        .add_xaxis(Faker.choose())
        .add_yaxis("商家A", Faker.values())
        .set_global_opts(
            title_opts=opts.TitleOpts(title="Scatter-VisualMap(Color)"),
            visualmap_opts=opts.VisualMapOpts(max_=150),
        )
    )
    return c
2.
pyecharts/pyecharts · page_example.py
Match rating: 62.87% · See similar code snippets
python logo
def line_base() -> Line:
    c = (
        Line()
        .add_xaxis(Faker.choose())
        .add_yaxis("商家A", Faker.values())
        .add_yaxis("商家B", Faker.values())
        .set_global_opts(title_opts=opts.TitleOpts(title="Line-基本示例"))
    )
    return c
3.
pyecharts/pyecharts · line_example.py
Match rating: 62.4% · See similar code snippets
python logo
def line_step() -> Line:
    c = (
        Line()
        .add_xaxis(Faker.choose())
        .add_yaxis("商家A", Faker.values(), is_step=True)
        .set_global_opts(title_opts=opts.TitleOpts(title="Line-阶梯图"))
    )
    return c
4.
pyecharts/pyecharts · bar_example.py
Match rating: 57.94% · See similar code snippets
python logo
def bar_stack0() -> Bar:
    c = (
        Bar()
        .add_xaxis(Faker.choose())
        .add_yaxis("商家A", Faker.values(), stack="stack1")
        .add_yaxis("商家B", Faker.values(), stack="stack1")
        .set_series_opts(label_opts=opts.LabelOpts(is_show=False))
        .set_global_opts(title_opts=opts.TitleOpts(title="Bar-堆叠数据(全部)"))
    )
    return c
5.
pyecharts/pyecharts · bar_example.py
Match rating: 57.39% · See similar code snippets
python logo
def bar_reversal_axis() -> Bar:
    c = (
        Bar()
        .add_xaxis(Faker.choose())
        .add_yaxis("商家A", Faker.values())
        .add_yaxis("商家B", Faker.values())
        .reversal_axis()
        .set_series_opts(label_opts=opts.LabelOpts(position="right"))
        .set_global_opts(title_opts=opts.TitleOpts(title="Bar-翻转 XY 轴"))
    )
    return c
6.
pyecharts/pyecharts · bar_example.py
Match rating: 53.12% · See similar code snippets
python logo
def bar_toolbox() -> Bar:
    c = (
        Bar()
        .add_xaxis(Faker.choose())
        .add_yaxis("商家A", Faker.values())
        .add_yaxis("商家B", Faker.values())
        .set_global_opts(
            title_opts=opts.TitleOpts(title="Bar-显示 ToolBox"),
            toolbox_opts=opts.ToolboxOpts(),
            legend_opts=opts.LegendOpts(is_show=False)
        )
    )
    return c
7.
samirelanduk/quickplots · charts.py
Match rating: 52.11% · See similar code snippets
python logo
def scatter(self, *args, **kwargs):
        """Adds a :py:class:`.ScatterSeries` to the chart.

        :param \*data: The data for the series as either (x,y) values or two big\
        tuples/lists of x and y values respectively.
        :param str name: The name to be associated with the series.
        :param str color: The hex colour of the line.
        :param Number size: The size of each data point - generally the diameter.
        :param Number linewidth: The width in pixels of the data points' edge.
        :raises ValueError: if the size and length of the data doesn't match\
        either format."""

        if "color" not in kwargs:
            kwargs["color"] = self.next_color()
        series = ScatterSeries(*args, **kwargs)
        self.add_series(series)
8.
pyecharts/pyecharts · polar_example.py
Match rating: 51.01% · See similar code snippets
python logo
def polar_scatter1() -> Polar:
    c = (
        Polar()
        .add("", [(10, random.randint(1, 100)) for i in range(300)], type_="scatter")
        .add("", [(11, random.randint(1, 100)) for i in range(300)], type_="scatter")
        .set_series_opts(label_opts=opts.LabelOpts(is_show=False))
        .set_global_opts(title_opts=opts.TitleOpts(title="Polar-Scatter1"))
    )

    return c
9.
SheffieldML/GPy · plot_definitions.py
Match rating: 50.8% · See similar code snippets
python logo
def scatter(self, ax, X, Y, Z=None, color=Tango.colorsHex['mediumBlue'], label=None, marker='o', **kwargs):
        if Z is not None:
            return ax.scatter(X, Y, c=color, zs=Z, label=label, marker=marker, **kwargs)
        return ax.scatter(X, Y, c=color, label=label, marker=marker, **kwargs)
10.
pyecharts/pyecharts · map_example.py
Match rating: 50.45% · See similar code snippets
python logo
def map_guangdong() -> Map:
    c = (
        Map()
        .add("商家A", [list(z) for z in zip(Faker.guangdong_city, Faker.values())], "广东")
        .set_global_opts(
            title_opts=opts.TitleOpts(title="Map-广东地图"),
            visualmap_opts=opts.VisualMapOpts(),
        )
    )
    return c