bug: plot_ibound method not working, grid is not shown #2608
aestrad-intera
started this conversation in
General
Replies: 5 comments
|
Do you have any more information? The |
0 replies
|
Also to plot the grid, call: mv.plot_grid() |
0 replies
|
Thank you for your suggestion, Joshua.
I agree that plot_ibound has been reliable, as I have never had any issue
with it until now. This is a 2D, MF6, 1-layer model with all cells as
active. I don't see anything wrong with my lines of code:
fig, ax = plt.subplots(1, 1, figsize=(10, 8))
# fig.suptitle('',fontsize=18)
mv = flopy.plot.PlotMapView(model=gwf, layer=0, ax=ax)
for level, color in zip(levels, rgba):
mv.contour_array(mf6_conc, levels=[level], colors=color, linewidths=2.0,
alpha=1., linestyles='solid')
mv.contour_array(pht3d_conc, levels=[level], colors=color,
linewidths=2.0,
alpha=1., linestyles='dashed')
mv.plot_bc('WEL', color='red')
mv.plot_bc('CHD', color='blue')
mv.plot_ibound(alpha=0.8)
plt.show()
ax.set_title(f'Toluene concentrations after {day} days',fontsize=14)
# ax.set_axis_off()
fig.tight_layout()
That code produces:
[image: image.png]
See there is no grid. But your suggestion works:
fig, ax = plt.subplots(1, 1, figsize=(10, 8))
# fig.suptitle('',fontsize=18)
mv = flopy.plot.PlotMapView(model=gwf, layer=0, ax=ax)
mv.plot_grid(alpha=0.5)
for level, color in zip(levels, rgba):
mv.contour_array(mf6_conc, levels=[level], colors=color, linewidths=2.0,
alpha=1., linestyles='solid')
mv.contour_array(pht3d_conc, levels=[level], colors=color,
linewidths=2.0,
alpha=1., linestyles='dashed')
mv.plot_bc('WEL', color='red')
mv.plot_bc('CHD', color='blue')
# mv.plot_ibound(alpha=0.8)
plt.show()
ax.set_title(f'Toluene concentrations after {day} days',fontsize=14)
# ax.set_axis_off()
fig.tight_layout()
[image: image.png]
Thanks,
Andres
…On Fri, Sep 5, 2025 at 4:40 PM Joshua Larsen ***@***.***> wrote:
*jlarsen-usgs* left a comment (modflowpy/flopy#2592)
<#2592 (comment)>
Also to plot the grid, call:
mv.plot_grid()
—
Reply to this email directly, view it on GitHub
<#2592 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A52MYOIOLKNX2FP4LQM6SBT3RH7OXAVCNFSM6AAAAACFYIDIY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENJZHAZDKMRZGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
0 replies
|
@aestrad-intera could you provide the model you are using with this plotting code, or a simple one reproducing the issue? |
0 replies
|
@aestrad-intera |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
mv = flopy.plot.PlotMapView(model=gwf, layer=0, ax=ax)
mv.plot_ibound(alpha=0.8)
this does not plot ibound, grid is not shown on plot
All reactions