Beispiel #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="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
Beispiel #2
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
Beispiel #3
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
Beispiel #4
0
def get_bottom_orientation_bar():
    pos = 600, 150
    size = 300, 10

    colorbar = ColorBarVisual(pos=pos, size=size,
                              label_str="orientation bottom",
                              cmap=colormap, orientation="bottom")

    return style_colorbar(colorbar)
Beispiel #5
0
def get_top_orientation_bar():
    pos = 600, 400
    size = 300, 10

    colorbar = ColorBarVisual(pos=pos, size=size,
                              label_str="orientation top",
                              cmap=colormap, orientation="top")

    return style_colorbar(colorbar)
Beispiel #6
0
def get_right_orientation_bar():
    pos = 200, 300
    size = 400, 10

    colorbar = ColorBarVisual(pos=pos, size=size,
                              label_str="orientation right",
                              cmap=colormap, orientation="right")

    return style_colorbar(colorbar)
def get_bottom_orientation_bar():
    pos = 600, 150
    halfdim = 150, 10

    colorbar = ColorBarVisual(pos,
                              halfdim,
                              label_str="orientation bottom",
                              cmap=colormap,
                              orientation="bottom")

    return style_colorbar(colorbar)
def get_top_orientation_bar():
    pos = 600, 400
    halfdim = 150, 10

    colorbar = ColorBarVisual(pos,
                              halfdim,
                              label_str="orientation top",
                              cmap=colormap,
                              orientation="top")

    return style_colorbar(colorbar)
def get_right_orientation_bar():
    pos = 200, 300
    halfdim = 10, 200

    colorbar = ColorBarVisual(pos,
                              halfdim,
                              label_str="orientation right",
                              cmap=colormap,
                              orientation="right")

    return style_colorbar(colorbar)
Beispiel #10
0
def get_left_orientation_bar():
    pos = 50, 300
    size = 400, 10

    colorbar = ColorBarVisual(pos=pos,
                              size=size,
                              label="orientation left",
                              cmap=colormap,
                              orientation="left")

    return style_colorbar(colorbar)
Beispiel #11
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