示例#1
0
def step_impl(context):
    for name, color_map in context.color_maps:
        testing.assert_html_equal(
            color_map._repr_html_(), "color-diverging-map-%s" % name)
示例#2
0
def step_impl(context):
    for name, color_map in context.color_maps:
        testing.assert_html_equal(color_map._repr_html_(),
                                  "color-diverging-map-%s" % name)
示例#3
0
def step_impl(context):
    colormap = toyplot.color.CategoricalMap(
        toyplot.color.brewer.palette("BlueGreenBrown", 3))
    testing.assert_html_equal(colormap._repr_html_(), "color-categorical-map")
示例#4
0
def step_impl(context):
    for name, palette in context.palettes:
        testing.assert_html_equal(palette._repr_html_(),
                                  "color-brewer-%s" % name)
示例#5
0
def step_impl(context):
    context.palette += toyplot.color.brewer.palette("Blues")
    testing.assert_html_equal(context.palette._repr_html_(),
                              "color-palette-iadd")
示例#6
0
def step_impl(context):
    colors = numpy.array(["red", "green", "blue", "black"])
    palette = toyplot.color.Palette(colors)
    testing.assert_html_equal(palette._repr_html_(), "color-palette-css-array")
示例#7
0
def step_impl(context):
    testing.assert_html_equal(
        context.palette._repr_html_(), "color-palette-reverse")
示例#8
0
def step_impl(context):
    palette = toyplot.color.spread(context.color)
    testing.assert_html_equal(palette._repr_html_(), "color-spread")
示例#9
0
def step_impl(context):
    palette = context.palettes[0] + context.palettes[1]
    testing.assert_html_equal(
        palette._repr_html_(), "color-palette-add")
示例#10
0
def step_impl(context):
    context.palette += toyplot.color.brewer.palette("Blues")
    testing.assert_html_equal(
        context.palette._repr_html_(), "color-palette-iadd")
示例#11
0
def step_impl(context):
    palette = toyplot.color.spread(context.color)
    testing.assert_html_equal(palette._repr_html_(), "color-spread")
示例#12
0
def step_impl(context):
    testing.assert_html_equal(
        context.color_map._repr_html_(), "color-linear-map")
示例#13
0
def step_impl(context):
    testing.assert_html_equal(
        context.color_map._repr_html_(), "color-diverging-map-custom")
示例#14
0
def step_impl(context):
    testing.assert_html_equal(context.color_map._repr_html_(),
                              "color-diverging-map-custom")
示例#15
0
def step_impl(context):
    colors = numpy.array(["red", "green", "blue", "black"])
    palette = toyplot.color.Palette(colors)
    testing.assert_html_equal(palette._repr_html_(), "color-palette-css-array")
示例#16
0
def step_impl(context):
    testing.assert_html_equal(context.color_map._repr_html_(),
                              "color-linear-map")
示例#17
0
def step_impl(context):
    colors = [(1, 0, 0, 1), (0, 1, 0, 1), (0, 0, 1, 1), (0, 0, 0, 0.5)]
    palette = toyplot.color.Palette(colors)
    testing.assert_html_equal(palette._repr_html_(), "color-palette-rgba-tuples")
示例#18
0
def step_impl(context):
    palette = context.palettes[0] + context.palettes[1]
    testing.assert_html_equal(palette._repr_html_(), "color-palette-add")
示例#19
0
def step_impl(context):
    colormap = toyplot.color.CategoricalMap(
        toyplot.color.brewer.palette("BlueGreenBrown", 3))
    testing.assert_html_equal(colormap._repr_html_(), "color-categorical-map")
示例#20
0
def step_impl(context):
    testing.assert_html_equal(context.palette._repr_html_(),
                              "color-palette-reverse")
示例#21
0
def step_impl(context):
    testing.assert_html_equal(
        toyplot.color._jupyter_color_swatches(context.value), "color-swatch")
示例#22
0
def step_impl(context):
    colors = [(1, 0, 0, 1), (0, 1, 0, 1), (0, 0, 1, 1), (0, 0, 0, 0.5)]
    palette = toyplot.color.Palette(colors)
    testing.assert_html_equal(palette._repr_html_(),
                              "color-palette-rgba-tuples")
示例#23
0
def step_impl(context):
    for name, palette in context.palettes:
        testing.assert_html_equal(
            palette._repr_html_(), "color-brewer-%s" % name)
示例#24
0
def step_impl(context):
    testing.assert_html_equal(
        toyplot.color._jupyter_color_swatches(context.value), "color-swatch")
示例#25
0
def step_impl(context):
    testing.assert_html_equal(context.palette._repr_html_(),
                              "color-brewer-count")
示例#26
0
文件: colormap.py 项目: kmatt/toyplot
def step_impl(context, reference):
    testing.assert_html_equal(toyplot.color._jupyter_color_swatches(context.colors), reference)
示例#27
0
def step_impl(context):
    testing.assert_html_equal(
        context.palette._repr_html_(), "color-brewer-count")