The Plotly javascript visualization library has previously featured partial integration with FEATool Multiphysics through its online web based service. As the core Plotly javascript library has been open sourced and made available to external projects, as well as now supporting full 3D plots with the mesh3d type, Plotly has now been fully integrated with FEATool supporting all finite element FEM postprocessing options such as surface, contour, and arrow plots in 1D, 2D, and 3D. This means that one can now use Plotly directly for visualization instead of the default Matlab or Octave plots.

From the FEATool GUI Plotly plots can now be created directly by simply pressing the button labeled Plotly, either in the postprocessing toolbar or in the postprocessing settings dialog box. This will create the selected plotly visualization data and save it to a corresponding html file which will be opened in your default web browser. The plot and data can then be examined with the plotly interface, exported as image files, and also uploaded to the plotly cloud for sharing with colleagues and coworkers, see for example the FEATool Multiphysics Plotly web archive. Besides creating nice looking plots, direct web interface to examining the data, and online sharing, other advantages of using Plotly compared to Matlab or Octave is that the performance can be better, especially for 3D plots.

FEATool Multiphysics - Plotly integration with Matlab and Octave

Matlab and Octave CLI command line usage is just as easy as before. The postplot commands have been updated to include a renderer flag with a plotly option, to use plotly simply add this flag to a corresponding postplot command

postplot( fea, ..., 'renderer', 'plotly' )

where are your usual postprocessing property value pairs such as surfexpr, isoexpr, and arrowexpr etc. The plotly postprocessing data struct can also optionally be obtained as

plotly_data = postplot( fea, ..., 'renderer', 'plotly' );

and corresponding web html file generation can manually be called with

html_file = plotlyoffline( plotly_data );

For example, the image above can be created with the following Matlab/Octave commands

% Set up model, solve, and export finite element FEA/FEM data.
fea = ex_linearelasticity4( 'ilev', 1 );

% Optionally deform grid according to displacement.
dscale = 5e3;
dp = zeros(size(fea.grid.p));
for i=1:3
  dp(i,:) = dscale * evalexpr( fea.dvar{i}, fea.grid.p, fea );
fea.grid.p = fea.grid.p + dp;

% Postprocessing call with plotly switch.
postplot( fea, 'surfexpr', 'sqrt(u^2+v^2+w^2)', ...
               'title',    'Total displacement', ...
               'renderer', 'plotly' )

The full plotly integration update patch can be downloaded from the link below

FEATool Multiphysics Full Plotly Integration Patch

To install it, extract the contents and overwrite the corresponding files in your existing featool directory, and restart Matlab/Octave and FEATool.

Please feel free to try the FEATool Plotly visualization and share your models and plots.