Closed rjleveque closed 3 years ago
No worries, I can definitely fix that import statement.
From what I understand, ITEM was a matplotlib related thing so iterating through the items caused issues with GDAL.
I still used it because it was where I could find the plot_type parameter outside of a loop that iterates through them.
I could add a conditional to check that ITEM1 even exists in the first place.
On Wed, Sep 22, 2021 at 3:10 PM Randall J. LeVeque @.***> wrote:
Reverts #282 https://github.com/clawpack/visclaw/pull/282
@AsianHam https://github.com/AsianHam: Sorry, I merged #282 https://github.com/clawpack/visclaw/pull/282 without properly testing it and it has at least a couple problems that render it inoperable on some standard examples.
In frametools.py:
import geoCon as gc should be from clawpack.visclaw import geoCon as gc
Line 183-184:
if plotaxes.plotitem_dict['ITEM1'].plot_type == '2d_gtiff': gc.render(framesolns[0], frameno)
This is hardwired with the assumption that plotitem_dict has a key ITEM1. But if the user calls plotaxes.new_plotitem with the name argument then the default ITEM1 is not used.
Moreover, I don't understand why this call is made in the loop on plotfigure._axesnames rather than later in the embedded loop on plotaxes._itemnames that starts at line 320. Why is this done only for the first item?
But it's not clear to me what the use case is for this, so perhaps the original PR can be fixed up and a new PR issued with more explanation?
Thanks!
You can view, comment on, or merge this pull request online at:
https://github.com/clawpack/visclaw/pull/283 Commit Summary
- Revert "2D Tiff plot option" https://github.com/clawpack/visclaw/pull/283/commits/68036d0e8048e31abf830a5cb6ecc8de0c1fe284
File Changes
- M src/python/visclaw/data.py https://github.com/clawpack/visclaw/pull/283/files#diff-cb71ef6658cf428c95db6a7f841a5a0689fe5e8c2a3c222c17a01e82ede55ddf (3)
- M src/python/visclaw/frametools.py https://github.com/clawpack/visclaw/pull/283/files#diff-8335c03cb0845b1c197d1e8574a3e0c0c81ab8af4314d3b49082ced6de967727 (13)
- D src/python/visclaw/geoCon.py https://github.com/clawpack/visclaw/pull/283/files#diff-943f46dc4c9ebd10a5b72f3865eeb0ec126f2e2bf05dd7532d79a0f432218564 (177)
Patch Links:
- https://github.com/clawpack/visclaw/pull/283.patch
- https://github.com/clawpack/visclaw/pull/283.diff
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/clawpack/visclaw/pull/283, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBXSXQ5TJI3QLQSVRPWVADUDIS37ANCNFSM5ESAXLQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
ClawPlotAxes.new_plotitem
is defined in visclaw.data
and is where ITEMn
is specified if name
is not provided, with n
incremented for each unnamed item.
In general a user may specify many plot items on a single plot axes, and the items might have different plot_type
, e.g. perhaps one item with plot_type='2d_pcolor'
and another with plot_type='2d_contour'
to put contour lines on top of a pcolor plot, so it doesn't make sense to determine the plot_type
outside the loop over items.
I'll take another look and re-PR
On Wed, Sep 22, 2021 at 3:42 PM Randall J. LeVeque @.***> wrote:
ClawPlotAxes.new_plotitem is defined in visclaw.data and is where ITEMn is specified if name is not provided, with n incremented for each unnamed item.
In general a user may specify many plot items on a single plot axes, and the items might have different plot_type, e.g. perhaps one item with plot_type='2d_pcolor' and another with plot_type='2d_contour' to put contour lines on top of a pcolor plot, so it doesn't make sense to determine the plot_type outside the loop over items.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/clawpack/visclaw/pull/283#issuecomment-925271394, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBXSXSZD2TN6IY77TTI2OLUDIWTFANCNFSM5ESAXLQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Reverts clawpack/visclaw#282
@AsianHam: Sorry, I merged #282 without properly testing it and it has at least a couple problems that render it inoperable on some standard examples.
In
frametools.py
:import geoCon as gc
should befrom clawpack.visclaw import geoCon as gc
Line 183-184:
This is hardwired with the assumption that
plotitem_dict
has a keyITEM1
. But if the user callsplotaxes.new_plotitem
with thename
argument then the defaultITEM1
is not used.Moreover, I don't understand why this call is made in the loop on
plotfigure._axesnames
rather than later in the embedded loop onplotaxes._itemnames
that starts at line 320. Why is this done only for the first item?But it's not clear to me what the use case is for this, so perhaps the original PR can be fixed up and a new PR issued with more explanation?
Thanks!