contour
simple_contour(fun, min_x=-1, max_x=1, min_y=-1, max_y=1, min_z=None, max_z=None, n_samples=100, n_levels=30)
¶
Simple contour plot
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fun |
_type_
|
description |
required |
min_x |
int
|
description. Defaults to -1. |
-1
|
max_x |
int
|
description. Defaults to 1. |
1
|
min_y |
int
|
description. Defaults to -1. |
-1
|
max_y |
int
|
description. Defaults to 1. |
1
|
min_z |
int
|
description. Defaults to 0. |
None
|
max_z |
int
|
description. Defaults to 1. |
None
|
n_samples |
int
|
description. Defaults to 100. |
100
|
n_levels |
int
|
description. Defaults to 5. |
30
|
Examples:
>>> import matplotlib.pyplot as plt
import numpy as np
from spotpython.fun.objectivefunctions import analytical
fun = analytical().fun_branin
simple_contour(fun=fun, n_levels=30, min_x=-5, max_x=10, min_y=0, max_y=15)
Source code in spotpython/plot/contour.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|