Skip to content

fix : fix the bug located in colormap for displaying graphics#672

Draft
mayankansys wants to merge 2 commits intomainfrom
fix/colormap_dispalying_graphics
Draft

fix : fix the bug located in colormap for displaying graphics#672
mayankansys wants to merge 2 commits intomainfrom
fix/colormap_dispalying_graphics

Conversation

@mayankansys
Copy link
Collaborator

No description provided.

@mayankansys mayankansys linked an issue Mar 13, 2026 that may be closed by this pull request
2 tasks
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes colormap display in graphics by hoisting clean_field computation and setting scalar_bar_args["title"] earlier, and updates the example script to pass required solver parameters.

Changes:

  • Moves clean_field = field.replace("\n", " ") to the top of _display_vector, _display_pathlines, and _display_contour, removing duplicate computations, and sets scalar_bar_args["title"] to fix colormap title display.
  • Updates example script to pass solver=solver_session and settings_source=solver_session to graphics objects, and adds ui_mode="gui".

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/ansys/fluent/visualization/graphics/graphics_windows_manager.py Deduplicates clean_field computation and sets scalar bar title earlier to fix colormap display
examples/00-post_processing/post_processing_context_manager.py Adds required solver and settings_source parameters to graphics object constructors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +307 to +310
try:
scalar_bar_args["title"] = clean_field
except (NameError, UnboundLocalError):
pass
@mayankansys mayankansys marked this pull request as ready for review March 17, 2026 08:46
@mayankansys mayankansys marked this pull request as draft March 17, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug located in colormap for displaying graphics

2 participants