From 19fcd61f2d605fe6541410f4230e0513d2ab1b6a Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Mon, 4 Sep 2023 13:02:26 +0200 Subject: [PATCH] Fixing `post_processing` plots (#2295) * Using grid instead of mesh * Fixing empty plots. Adding a cmap to avoid buggy plots * Undo using grid. --------- Co-authored-by: Camille <78221213+clatapie@users.noreply.github.com> --- src/ansys/mapdl/core/plotting.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ansys/mapdl/core/plotting.py b/src/ansys/mapdl/core/plotting.py index 988b2910ac..557ceac50c 100644 --- a/src/ansys/mapdl/core/plotting.py +++ b/src/ansys/mapdl/core/plotting.py @@ -398,6 +398,9 @@ def _general_plotter( UserWarning, ) + if not cmap: + cmap = "bwr" + if background: plotter.set_background(background) @@ -442,7 +445,7 @@ def _general_plotter( for each_mesh in mesh_: plotter.add_mesh( each_mesh, - scalars=None, # scalars, + scalars=scalars, scalar_bar_args=scalar_bar_args, color="w", # mesh.get("color", color), style=mesh.get("style", style),