Beispiel #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)
Beispiel #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)
Beispiel #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")
Beispiel #4
0
def step_impl(context):
    for name, palette in context.palettes:
        testing.assert_html_equal(palette._repr_html_(),
                                  "color-brewer-%s" % name)
Beispiel #5
0
def step_impl(context):
    context.palette += toyplot.color.brewer.palette("Blues")
    testing.assert_html_equal(context.palette._repr_html_(),
                              "color-palette-iadd")
Beispiel #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")
Beispiel #7
0
def step_impl(context):
    testing.assert_html_equal(
        context.palette._repr_html_(), "color-palette-reverse")
Beispiel #8
0
def step_impl(context):
    palette = toyplot.color.spread(context.color)
    testing.assert_html_equal(palette._repr_html_(), "color-spread")
Beispiel #9
0
def step_impl(context):
    palette = context.palettes[0] + context.palettes[1]
    testing.assert_html_equal(
        palette._repr_html_(), "color-palette-add")
Beispiel #10
0
def step_impl(context):
    context.palette += toyplot.color.brewer.palette("Blues")
    testing.assert_html_equal(
        context.palette._repr_html_(), "color-palette-iadd")
Beispiel #11
0
def step_impl(context):
    palette = toyplot.color.spread(context.color)
    testing.assert_html_equal(palette._repr_html_(), "color-spread")
Beispiel #12
0
def step_impl(context):
    testing.assert_html_equal(
        context.color_map._repr_html_(), "color-linear-map")
Beispiel #13
0
def step_impl(context):
    testing.assert_html_equal(
        context.color_map._repr_html_(), "color-diverging-map-custom")
Beispiel #14
0
def step_impl(context):
    testing.assert_html_equal(context.color_map._repr_html_(),
                              "color-diverging-map-custom")
Beispiel #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")
Beispiel #16
0
def step_impl(context):
    testing.assert_html_equal(context.color_map._repr_html_(),
                              "color-linear-map")
Beispiel #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")
Beispiel #18
0
def step_impl(context):
    palette = context.palettes[0] + context.palettes[1]
    testing.assert_html_equal(palette._repr_html_(), "color-palette-add")
Beispiel #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")
Beispiel #20
0
def step_impl(context):
    testing.assert_html_equal(context.palette._repr_html_(),
                              "color-palette-reverse")
Beispiel #21
0
def step_impl(context):
    testing.assert_html_equal(
        toyplot.color._jupyter_color_swatches(context.value), "color-swatch")
Beispiel #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")
Beispiel #23
0
def step_impl(context):
    for name, palette in context.palettes:
        testing.assert_html_equal(
            palette._repr_html_(), "color-brewer-%s" % name)
Beispiel #24
0
def step_impl(context):
    testing.assert_html_equal(
        toyplot.color._jupyter_color_swatches(context.value), "color-swatch")
Beispiel #25
0
def step_impl(context):
    testing.assert_html_equal(context.palette._repr_html_(),
                              "color-brewer-count")
Beispiel #26
0
def step_impl(context, reference):
    testing.assert_html_equal(toyplot.color._jupyter_color_swatches(context.colors), reference)
Beispiel #27
0
def step_impl(context):
    testing.assert_html_equal(
        context.palette._repr_html_(), "color-brewer-count")