plot_mesh.py is undocumented in Wiki and might not show plot #204
Labels
bug
Broken functionality or unexpected result
documentation
Relating to the Wiki, Website, or Markdown files
good first issue
Ideal for developers looking to dive into the Athena++ codebase
visualization
Visualization scripts included in repository
Milestone
Summary of issue
vis/python/plot_mesh.py
was first added to the repository by @jmstone in 0a10fa8 on 2016-04-14 and later generalized to accept-i
,-o
flags by @c-white in 8b0d5f5 on 2017-11-03.The only page in the Wiki that mentions it is the Tutorial page SMR and AMR. Even there, it only tangentially appears in the example output of the
./athena -m 1
command, while the actual tutorial text instructs the user to use gnuplot to view the SMR mesh structure.At a minimum, I feel like it should be documented in Plotting Scripts like
plot_lines.py, plot_slice.py, plot_spherical.py
. And/or it should be removed from being mentioned in the stdout output ofMesh::OutputMeshStructure(int dim)
:athena/src/mesh/mesh.cpp
Lines 1013 to 1021 in 1da278d
(this also assumes the default directory hierarchy, e.g. that the user ran Athena++ in
bin/
subdirectory of the root repository directory)When I was testing the SMR checks in #200, I tried to use
plot_mesh.py
to visualize the spherical-polar refined meshes, but I believe the script assumes that themesh_structure.dat
data was generated using the Cartesian coordinate system. This should be explicitly noted, perhaps in the script name.Also, the script would only work with
-o [file]
, see below.Steps to reproduce
With either Python 2 or 3 on my macOS system, the last command causes the
plt.show()
function to return immediately without displaying the image. I believe this is platform-specific behavior depending on the interactivity of the matplotlib backend (toggled withplt.ioff()
andplt.ion()
), but do the othervis/python/plot*
scripts behave this way? It very much appeared like a bug in the script.Adding
-o test.png
to the final command produces the correct image in the file.To-do
plot_mesh.py
usage and limitations in Plotting Scriptsplot_mesh.py
-m
outputvis/python/utils/
and moveuniform.py
,spherical_refinement.py
,athena_read.py
there since none of these files directly visualize anything unlike the 4xplot_*.py
scripts.The text was updated successfully, but these errors were encountered: