Skip to content

Adding the color bar to the plots #215

Answered by paulf81
Josue9740 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! FLORIS is using matplotlib's pcolormesh to draw these in size the visualize_cut_plane function:
https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.pcolormesh.html

The function returns the image handle you can use to add this colorbar. For example, changing example_00_open_and_vis_floris.py so that the last block of code looks like this:

# Plot and show
fig, ax = plt.subplots()
im = wfct.visualization.visualize_cut_plane(hor_plane, ax=ax)
fig.colorbar(im, ax=ax)
plt.show()

Adds the color bar

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Josue9740
Comment options

Answer selected by bayc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants