0

I am using functions, e.x: ml.dis.top.plot(). I would like to rotate these figures and delete titles. How can I do that?

plt.title('') seems to work for titles but I cannot rotate these figures. Here is the part of the script:

fig = plt.figure(figsize=(75, 75))
plt.subplot(1,1,1,aspect='equal')
mf.dis.top.plot(contour=True, colorbar=True) 
plt.title('')
plt.savefig('top_plot.png')
Kalamarico
  • 5,466
  • 22
  • 53
  • 70

1 Answers1

0

So there are different ways that you can make model plots in flopy. You are using the quick and easy way to plot one of our arrays. What you probably want to do is use the ModelMap capability, which is described in https://github.com/modflowpy/flopy/blob/develop/examples/Notebooks/flopy3_MapExample.ipynb. This will give you full control over your figure, including rotation and offset and will allow you to customize the title and anything else you'll need to do. The code might look something like the following:

fig = plt.figure(figsize=(75, 75))
ax = plt.subplot(1, 1, 1, aspect='equal')
modelmap = flopy.plot.ModelMap(model=mf, rotation=14)
modelmap.contour_array(mf.dis.top.array)
plt.savefig('top_plot.png')
  • We actually had this one in our code. The problem is that we like to have top, lpf, rch as contour filled plots (as well as head) mf.dis.top.plot(contour=True, colorbar=True), will do it but modelmap.contour_array(mf.dis.top.array), will not. Do you also have contourf -option for this? – Jokkonen Dec 08 '18 at 07:43
  • There isn't a contourf option for any of these plots (maybe there should be), including when you call mf.dis.top.plot(). But there is a modelmap.plot_array() method, which may be what you want. – Christian Langevin Dec 09 '18 at 15:05
  • Do you have a function for head values too like you have top, rch and lpf (e.g. mf.dis.top.plot())? I could not find any. – Jokkonen Dec 11 '18 at 16:42