Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias Import alias identifier Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Num While BoolOpAnd CompareLtLt NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad CompareLt NameLoad NameLoad body Assign NameStore BinOpAdd BinOpPow NameLoad Num NameLoad AugAssignAdd NameStore Num Return BinOpDiv Call NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad keyword Str Assign AttributeStore AttributeLoad NameLoad attr attr Num Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign AttributeStore NameLoad attr TupleLoad Num NameLoad Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index Num attr Num Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index Num attr Num Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index Num attr Str Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index Num attr Str Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Call NameLoad Str Return NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword TupleLoad Num Num keyword Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign AttributeStore NameLoad attr Call NameLoad NameLoad keyword NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad keyword Num keyword NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore TupleLoad Num Num SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list If CompareEq NameLoad Str body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr
N/A N/A Using Colorbars with the Canvas with the Mandlebrot set vispy app vispy gloo vispy.visuals.transforms STTransform vispy.visuals ColorBarVisual ImageVisual vispy.color Color get_colormap N/A numpy np N/A ESCAPE_MAGNITUDE 2 N/A MIN_MAGNITUDE 0.002 N/A MAX_ITERATIONS 50 N/A colormap N/A get_colormap hot get_num_escape_turns N/A N/A x y N/A N/A N/A Returns the number of iterations it took to escape
       as normalized values.
       Parameters
       ----------

       x: float
        the x coordinates of the point

       y: float
        the y coordinates of the point

       Returns
       -------
       float: [0, 1]
       * 0 if it took 0 iterations to escape
       * 1 if did not escape in MAX_ITERATIONS iterations
       * a linearly interpolated number between 0 and 1 if the point took
         anywhere between 0 to MAX_ITERATIONS to escape

     N/A c N/A complex x y N/A z N/A complex x y N/A num_iterations 0 N/A N/A N/A MIN_MAGNITUDE N/A N/A np absolute z ESCAPE_MAGNITUDE N/A num_iterations MAX_ITERATIONS N/A N/A z N/A N/A z 2 c N/A num_iterations 1 N/A N/A N/A float num_iterations N/A float MAX_ITERATIONS N/A get_mandlebrot_escape_values N/A N/A width height N/A N/A N/A Constructs the Mandlebro set for a grid of dimensions (width, height)

    Parameters
    ----------
    width: int
        width of the resulting grid
    height: int
        height of the resulting grid

    Returns
    -------
    A grid of floating point values containing the output of
    get_num_escape_turns function for each point
     N/A x_vals N/A N/A np linspace -3 2 width N/A y_vals N/A N/A np linspace -1.5 1.5 height N/A grid N/A N/A np meshgrid x_vals y_vals N/A v_get_num_escape_turns N/A N/A np vectorize get_num_escape_turns N/A N/A N/A N/A v_get_num_escape_turns grid astype N/A np float N/A get_vertical_bar N/A N/A pos size N/A N/A N/A 
    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
     N/A vertical N/A ColorBarVisual pos pos size size label_str iterations to escape cmap colormap orientation left N/A N/A N/A vertical label font_size 15 N/A N/A N/A vertical label color white N/A N/A vertical clim N/A 0 MAX_ITERATIONS N/A N/A N/A N/A vertical ticks N/A 0 font_size 10 N/A N/A N/A N/A vertical ticks N/A 1 font_size 10 N/A N/A N/A N/A vertical ticks N/A 0 color white N/A N/A N/A N/A vertical ticks N/A 1 color white N/A N/A vertical border_width 1 N/A N/A vertical border_color N/A Color #ababab N/A vertical N/A Canvas N/A N/A app Canvas N/A __init__ N/A N/A self N/A N/A N/A img_dim N/A N/A np array N/A 700 500 N/A colorbar_pos N/A N/A np array N/A 100 300 N/A colorbar_size N/A N/A np array N/A 400 20 N/A image_pos N/A N/A np array N/A 200 80 N/A N/A N/A N/A app Canvas __init__ self size N/A 800 600 keys interactive N/A img_data N/A get_mandlebrot_escape_values N/A img_dim N/A 0 N/A img_dim N/A 1 N/A N/A self image N/A ImageVisual img_data cmap colormap N/A N/A N/A self image transform N/A STTransform scale 1.1 translate image_pos N/A N/A self vertical_bar N/A get_vertical_bar colorbar_pos colorbar_size N/A N/A N/A self show N/A on_resize N/A N/A self event N/A N/A N/A vp N/A 0 0 N/A N/A self physical_size N/A 0 N/A N/A self physical_size N/A 1 N/A N/A N/A N/A self context set_viewport vp N/A N/A N/A N/A N/A self image transforms configure canvas self viewport vp N/A N/A N/A N/A N/A self vertical_bar transforms configure canvas self viewport vp N/A on_draw N/A N/A self event N/A N/A N/A N/A N/A gloo clear color N/A colormap N/A 0.0 N/A N/A N/A N/A self image draw N/A N/A N/A N/A self vertical_bar draw N/A N/A N/A N/A __name__ __main__ N/A N/A win N/A Canvas N/A N/A N/A app run