puncturedfem.plot.LocalFunctionPlot
Plot a local function.
Attributes:
| Name | Type | Description |
|---|---|---|
v |
LocalPoissonFunction
|
The local function to be plotted. |
triangulation |
tri.Triangulation
|
A triangulation of the interior points together with the boundary points. |
hole_mask |
np.ndarray
|
A mask that removes triangles that lie in a hole. |
use_interp |
bool
|
If True, the triangulation includes boundary points. |
__init__(v, use_interp=True)
Initialize a LocalFunctionPlot object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
v |
LocalPoissonFunction
|
The local function to be plotted. |
required |
draw(plot_type='values', show_plot=True, filename='', **kwargs)
Draw the plot of the internal values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plot_type |
str
|
The type of plot. Must be one of "values", "grad_x1", "grad_x2", or "grad_norm". |
'values'
|
show_plot |
bool
|
If True, the plot is shown. |
True
|
filename |
str
|
If not empty, the plot is saved to this file. |
''
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
fill |
bool
|
If True, a heatmap is plotted. If False, a contour plot is plotted. Default is True. |
title |
str
|
The title of the plot. Default is "", i.e. no title. |
levels |
int
|
The number of levels in the contour plot. Default is 32. |
colormap |
Optional[Colormap]
|
The colormap used for the plot. Default is None. |
show_colorbar |
bool
|
If True, a colorbar is shown. Default is True. |
show_axis |
bool
|
If True, the axis is shown. Default is True. |
show_boundary |
bool
|
If True, the boundary is shown. Default is True. |
show_triangulation |
bool
|
If True, the triangulation is shown. Default is False. |
use_log10 |
bool
|
If True, the log10 function is applied to interior and boundary values. Default is False. |
set_local_function(v)
Set the local function to be plotted.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
v |
LocalPoissonFunction
|
The local function to be plotted. |
required |