Allow switching on and off contour plot numerical labels at top level #719
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The flow visualization tools were hardcoded to plot numerical labels on the flow contour plots. This PR makes that an optional choice at the top level in the
visualize_cut_plane()
andvisualize_heterogeneous_cut_plane()
functions of tools/visualization.py, which are passed through to the mid-level functionline_contour_cut_plane()
.I have set the default value of the new
label_contours
Boolean to False, as I believe that most users will not want the contour labels shown. However, I've now updated examples 02_visualizations.py and 16_heterogeneous_inflow.py so thatlabel_contours
is set to True for those examples. I have left the default value (False) in other examples involving flow plots.Other notes
visualize_heterogeneous_cut_plane()
of tools/visualization.py does not appear to be called anywhere in the floris code or examples, and may be redundant. However, I have not confirmed this and have left the function in place.Examples
Running 02_visualizations.py with
label_contours = True
produceswhile setting
label_contours = False
produces