Gauss Point Evaluation
You can create a smooth field within each element for any expression by using the gpeval() operator. This operator has, in its most basic version, the syntax gpeval(integration_order, expression).
For a general description of the gpeval() operator, see gpeval in the COMSOL Multiphysics Reference Manual.
The gpeval() operator evaluates an expression at a given set of Gauss points, and creates an approximate smooth field using a least squares fit. If there are state variables stored at Gauss points, as is the case with many nonlinear material models, it is important that you use the correct integration order in the operator in order evaluate those variables accurately. In most cases, when quadratic shape functions are used, this means that the first argument should be 4.
For some common cases, physics interfaces define built-in variable with Gauss point evaluation. As an example, the built-in variable solid.sGpx is equivalent to using the expression gpeval(4,solid.sx).
When working with surface plots in a 3D geometry, or with line graphs in 2D and 3D, there is a subtle difference between the built-in variables and the operator syntax. The built-in variables are defined in the domain, and the field thus exists in the domain and can be evaluated from it on boundaries and edges. If, however, you type in the operator syntax as an expression in a line graph, the field is created only on the line, using Gauss points on the element edges. This is probably not what you want, in particular if the state variables are stored at Gauss points in the domain. In order to avoid this, create domain variables under Definitions>Variables using the operator syntax.