|
FEDEM Solver
R8.0
Source code of the dynamics solver
|
Interface for plots in python (x-y plots). More...
Data Types | |
| type | pyplot |
| Main python plot class. More... | |
Functions/Subroutines | |
| subroutine | destroy (me) |
| Destroys an instance of pyplot. More... | |
| subroutine | add_str (me, str) |
| Add a string to the string buffer. More... | |
| subroutine | initialize (me, grid, xlabel, ylabel, zlabel, title, legend, use_numpy, figsize, font_size, axes_labelsize, xtick_labelsize, ytick_labelsize, ztick_labelsize, legend_fontsize, mplot3d, axis_equal, polar, real_fmt, use_oo_api, axisbelow, tight_layout, istat) |
| Initializes curve plots. More... | |
| subroutine | add_plot (me, x, y, label, linestyle, markersize, linewidth, xlim, ylim, xscale, yscale, color, istat) |
| Add an x,y plot. More... | |
| subroutine | add_hist (me, x, label, xlim, ylim, xscale, yscale, bins, normed, cumulative, istat) |
| Add an histogram plot. More... | |
| subroutine | add_contour (me, x, y, z, label, linestyle, linewidth, levels, color, filled, cmap, colorbar, istat) |
| Add a contour plot. More... | |
| subroutine | add_3d_plot (me, x, y, z, label, linestyle, markersize, linewidth, istat) |
| Add a 3D x, y, z plot. More... | |
| subroutine | add_sphere (me, r, xc, yc, zc, n_facets, linewidth, antialiased, color, istat) |
| Add a sphere to a 3D x,y,z plot. More... | |
| subroutine | add_bar (me, x, height, label, width, bottom, color, yerr, align, xlim, ylim, xscale, yscale, istat) |
| Add a bar plot. More... | |
| subroutine | add_imshow (me, x, xlim, ylim, exValues, istat) |
Add an image plot using imshow More... | |
| subroutine | optional_int_to_string (int_value, string_value, default_value) |
| Integer to string, specifying the default value if the optional argument is not present. More... | |
| subroutine | optional_logical_to_string (logical_value, string_value, default_value) |
| Logical to string, specifying the default value if the optional argument is not present. More... | |
| subroutine | integer_to_string (i, s) |
| Integer to string conversion. More... | |
| subroutine | real_to_string (v, fmt, str) |
| Integer to string conversion. More... | |
| subroutine | vec_to_string (v, fmt, str, use_numpy, is_tuple) |
| Real vector to string. More... | |
| subroutine | matrix_to_string (v, fmt, str, use_numpy) |
| Real matrix (rank 2) to string. More... | |
| subroutine | execute (me, pyfile, istat) |
| Write the buffer to a specified file, then execute it with Python. More... | |
| subroutine | finish_ops (me) |
| Some final things to add before saving or showing the figure. More... | |
| subroutine | savefig (me, figfile, pyfile, dpi, transparent, facecolor, edgecolor, orientation, istat) |
| Save the figure. More... | |
| subroutine | showfig (me, pyfile, istat) |
| Show the figure. More... | |
Variables | |
| integer, parameter | max_int_len = 10 |
| max string length for integers More... | |
| integer, parameter | max_real_len = 30 |
| max string length for reals More... | |
Interface for plots in python (x-y plots).
|
private |
Add a 3D x, y, z plot.
mplot3d=.true. | [in,out] | me | class handler |
| [in] | x | x values |
| [in] | y | y values |
| [in] | z | z values |
| [in] | label | plot label |
| [in] | linestyle | style of the plot line |
| [in] | markersize | size of the plot markers |
| [in] | linewidth | width of the plot line |
| [out] | istat | status output |
|
private |
Add a bar plot.
| [in,out] | me | class handler |
| [in] | x | x bar values |
| [in] | height | height bar values |
| [in] | label | plot label |
| [in] | width | width values |
| [in] | bottom | bottom values |
| [in] | color | plot color |
| [in] | yerr | yerr values |
| [in] | align | default: 'center' |
| [in] | xlim | x-axis range |
| [in] | ylim | y-axis range |
| [in] | xscale | example: 'linear' (default), 'log' |
| [in] | yscale | example: 'linear' (default), 'log' |
| [out] | istat | status output (0 means no problems) |
|
private |
Add a contour plot.
use_numpy to be True. | [in,out] | me | class handler |
| [in] | x | x values |
| [in] | y | y values |
| [in] | z | z values |
| [in] | label | plot label |
| [in] | linestyle | style of the plot line |
| [in] | linewidth | width of the plot line |
| [in] | levels | contour levels to plot |
| [in] | color | color of the contour line |
| [in] | filled | use filled control (default=False) |
| [in] | cmap | colormap if filled=True (examples: 'jet', 'bone') |
| [in] | colorbar | add a colorbar (default=False) |
| [out] | istat | status output |
|
private |
Add an histogram plot.
| [in,out] | me | class handler |
| [in] | x | x values |
| [in] | label | plot label |
| [in] | xlim | x-axis range |
| [in] | ylim | y-axis range |
| [in] | xscale | example: 'linear' (default), 'log' |
| [in] | yscale | example: 'linear' (default), 'log' |
| [in] | bins | number of bins |
| [in] | normed | boolean flag that determines whether bin counts are normalized |
| [in] | cumulative | boolean flag that determines whether histogram represents the cumulative density of dataset |
| [out] | istat | status output |
|
private |
Add an image plot using imshow
| [in,out] | me | class handler |
| [in] | x | x values |
| [in] | xlim | x-axis range |
| [in] | ylim | y-axis range |
| [in] | exValues | array values to extent |
| [out] | istat | status output (0 means no problems) |
| subroutine pyplot_module::add_plot | ( | class(pyplot), intent(inout) | me, |
| real(dp), dimension(:), intent(in) | x, | ||
| real(dp), dimension(:), intent(in) | y, | ||
| character(len=*), intent(in) | label, | ||
| character(len=*), intent(in) | linestyle, | ||
| integer, intent(in), optional | markersize, | ||
| integer, intent(in), optional | linewidth, | ||
| real(dp), dimension(2), intent(in), optional | xlim, | ||
| real(dp), dimension(2), intent(in), optional | ylim, | ||
| character(len=*), intent(in), optional | xscale, | ||
| character(len=*), intent(in), optional | yscale, | ||
| real(dp), dimension(:), intent(in), optional | color, | ||
| integer, intent(out) | istat | ||
| ) |
Add an x,y plot.
| [in,out] | me | class handler |
| [in] | x | x values |
| [in] | y | y values |
| [in] | label | plot label |
| [in] | linestyle | style of the plot line |
| [in] | markersize | size of the plot markers |
| [in] | linewidth | width of the plot line |
| [in] | xlim | x-axis range |
| [in] | ylim | y-axis range |
| [in] | xscale | example: 'linear' (default), 'log' |
| [in] | yscale | example: 'linear' (default), 'log' |
| [in] | color | RGB color tuple |
| [out] | istat | status output |
|
private |
Add a sphere to a 3D x,y,z plot.
mplot3d=.true. and use_numpy=.true.. | [in,out] | me | class handler |
| [in] | r | radius of the sphere |
| [in] | xc | x value of sphere center |
| [in] | yc | y value of sphere center |
| [in] | zc | z value of sphere center |
| [in] | n_facets | [default is 100] |
| [in] | linewidth | line width |
| [in] | antialiased | enabled anti-aliasing |
| [in] | color | color of the contour line |
| [out] | istat | status output (0 means no problems) |
|
private |
Add a string to the string buffer.
| [in] | me | class handler |
| [in] | str | string buffer |
| subroutine pyplot_module::destroy | ( | class(pyplot), intent(inout) | me | ) |
Destroys an instance of pyplot.
| [in] | me | class handler |
|
private |
Write the buffer to a specified file, then execute it with Python.
| [in] | me | python plot handler |
| [in] | pyfile | name of the python script to generate |
| [out] | istat | status output (0 means no problems) |
| subroutine pyplot_module::finish_ops | ( | class(pyplot), intent(inout) | me | ) |
Some final things to add before saving or showing the figure.
| [in,out] | me | pytplot handler |
|
private |
Initializes curve plots.
| [in,out] | me | class handler |
| [in] | grid | flag for grid drawing |
| [in] | xlabel | x axis label |
| [in] | ylabel | y axis label |
| [in] | zlabel | z axis label |
| [in] | title | drawing title |
| [in] | legend | drawing legend |
| [in] | use_numpy | flag for using numpy |
| [in] | figsize | figure dimesnion |
| [in] | font_size | font size |
| [in] | axes_labelsize | axis label size |
| [in] | xtick_labelsize | size of x axis tick lables |
| [in] | ytick_labelsize | size of y axis tick lables |
| [in] | ztick_labelsize | size of z axis tick lables |
| [in] | legend_fontsize | size of legend font |
| [in] | mplot3d | set true for 3d plots |
| [in] | axis_equal | set true for axis = 'equal' |
| [in] | polar | set true for polar plots |
| [in] | real_fmt | format string for real numbers |
| [in] | use_oo_api | avoid matplotlib's GUI by using the OO interface |
| [in] | axisbelow | to put the grid lines below the other chart elements |
| [in] | tight_layout | enable tight layout |
| [out] | istat | Non-zero if python cannot be invoked |
|
private |
Integer to string conversion.
| [in] | i | integer |
| [out] | s | integer value stringified |
|
private |
Real matrix (rank 2) to string.
| [in] | v | real |
| [in] | fmt | real format string |
| [out] | str | real values stringified |
| [in] | use_numpy | activate numpy python module usage |
|
private |
Integer to string, specifying the default value if the optional argument is not present.
| [in] | int_value | integer |
| [out] | string_value | integer value stringified |
| [in] | default_value | default integer value |
|
private |
Logical to string, specifying the default value if the optional argument is not present.
| [in] | logical_value | logical value |
| [out] | string_value | integer value stringified |
| [in] | default_value | default integer value |
|
private |
Integer to string conversion.
| [in] | v | real |
| [in] | fmt | real format string |
| [out] | str | real values stringified |
|
private |
Save the figure.
| [in,out] | me | pytplot handler |
| [in] | figfile | file name for the figure |
| [in] | pyfile | name of the Python script to generate |
| [in] | dpi | resolution of the figure for png |
| [in] | transparent | transparent background (T/F) |
| [in] | facecolor | the colors of the figure rectangle |
| [in] | edgecolor | the colors of the figure rectangle |
| [in] | orientation | 'landscape' or 'portrait' |
| [out] | istat | status output (0 means no problems) |
| subroutine pyplot_module::showfig | ( | class(pyplot), intent(inout) | me, |
| character(len=*), intent(in), optional | pyfile, | ||
| integer, intent(out) | istat | ||
| ) |
Show the figure.
| [in,out] | me | pytplot handler |
| [in] | pyfile | name of the Python script to generate |
| [out] | istat | status output (0 means no problems) |
|
private |
Real vector to string.
| [in] | v | real |
| [out] | fmt | real format string |
| [out] | str | real values stringified |
| [in] | use_numpy | activate numpy python module usage |
| [in] | is_tuple | if true [default], use '()', if false use '[]' |
|
private |
max string length for integers
|
private |
max string length for reals