MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / show_results

Function show_results

fractals/julia_sets.py:127–145  ·  view source on GitHub ↗

Plots of whether the absolute value of z_final is greater than the value of escape_radius. Adds the function_label and function_params to the title. >>> show_results('80', 0, 1, np.array([[0,1,.5],[.4,2,1.1],[.2,1,1.3]]))

(
    function_label: str,
    function_params: Any,
    escape_radius: float,
    z_final: np.ndarray,
)

Source from the content-addressed store, hash-verified

125
126
127def show_results(
128 function_label: str,
129 function_params: Any,
130 escape_radius: float,
131 z_final: np.ndarray,
132) -> None:
133 """
134 Plots of whether the absolute value of z_final is greater than
135 the value of escape_radius. Adds the function_label and function_params to
136 the title.
137
138 >>> show_results('80', 0, 1, np.array([[0,1,.5],[.4,2,1.1],[.2,1,1.3]]))
139 """
140
141 abs_z_final = (abs(z_final)).transpose()
142 abs_z_final[:, :] = abs_z_final[::-1, :]
143 plt.matshow(abs_z_final < escape_radius)
144 plt.title(f"Julia set of ${function_label}$, $c={function_params}$")
145 plt.show()
146
147
148def ignore_overflow_warnings() -> None:

Callers 1

julia_sets.pyFile · 0.85

Calls 2

transposeMethod · 0.80
showMethod · 0.80

Tested by

no test coverage detected