示例#1
0
def get_vertical_bar(pos, size):
    """
    Constructs the vertical bar that represents the
    color values for the Mandlebrot set

    Returns
    -------
    A vispy.visual.ColorBarVisual object that represents the
    data of the Mandlebrot set
    """
    vertical = ColorBarVisual(pos=pos,
                              size=size,
                              label_str="iterations to escape",
                              cmap=colormap, orientation="left")

    vertical.label.font_size = 15
    vertical.label.color = "white"

    vertical.clim = (0, MAX_ITERATIONS)

    vertical.ticks[0].font_size = 10
    vertical.ticks[1].font_size = 10
    vertical.ticks[0].color = "white"
    vertical.ticks[1].color = "white"

    vertical.border_width = 1
    vertical.border_color = Color("#ababab")

    return vertical
示例#2
0
def get_vertical_bar(pos, size):
    """
    Constructs the vertical bar that represents the
    color values for the Mandlebrot set

    Returns
    -------
    A vispy.visual.ColorBarVisual object that represents the
    data of the Mandlebrot set
    """
    vertical = ColorBarVisual(pos=pos,
                              size=size,
                              label="iterations to escape",
                              cmap=colormap,
                              orientation="left")

    vertical.label.font_size = 15
    vertical.label.color = "white"

    vertical.clim = (0, MAX_ITERATIONS)

    vertical.ticks[0].font_size = 10
    vertical.ticks[1].font_size = 10
    vertical.ticks[0].color = "white"
    vertical.ticks[1].color = "white"

    vertical.border_width = 1
    vertical.border_color = Color("#ababab")

    return vertical
示例#3
0
def get_vertical_bar():
    """
    Constructs the vertical bar that represents the
    color values for the Mandlebrot set

    Returns
    -------
    A vispy.visual.ColorBarVisual object that represents the
    data of the Mandlebrot set
    """
    pos = 100, 300
    halfdim = 10, 200

    # similar to the previous case, only
    # with a vertical orientation
    # use clim to set the lower and upper values of the colorbar
    # which are drawn as labels on the bottom and top edge
    vertical = ColorBarVisual(pos, halfdim,
                              label_str="no. of iterations to escape",
                              cmap=colormap, orientation="left")

    vertical.label.font_size = 20
    vertical.label.color = "white"

    vertical.clim = (0, MAX_ITERATIONS)

    vertical.ticks[0].font_size = 20
    vertical.ticks[1].font_size = 20
    vertical.ticks[0].color = "white"
    vertical.ticks[1].color = "white"

    vertical.border_width = 2
    vertical.border_color = Color("#222222")

    return vertical
示例#4
0
def get_vertical_bar():
    """
    Constructs the vertical bar that represents the
    color values for the Mandlebrot set

    Returns
    -------
    A vispy.visual.ColorBarVisual object that represents the
    data of the Mandlebrot set
    """
    pos = 100, 300
    halfdim = 10, 200

    # similar to the previous case, only
    # with a vertical orientation
    # use clim to set the lower and upper values of the colorbar
    # which are drawn as labels on the bottom and top edge
    vertical = ColorBarVisual(pos,
                              halfdim,
                              label_str="no. of iterations to escape",
                              cmap=colormap,
                              orientation="left")

    vertical.label.font_size = 20
    vertical.label.color = "white"

    vertical.clim = (0, MAX_ITERATIONS)

    vertical.ticks[0].font_size = 20
    vertical.ticks[1].font_size = 20
    vertical.ticks[0].color = "white"
    vertical.ticks[1].color = "white"

    vertical.border_width = 2
    vertical.border_color = Color("#222222")

    return vertical