Closed mfhepp closed 2 years ago
Yes, this is a compromise between two things:
plt.show()
.plt.show()
is reachable or if it is in a comment, for example.Is there a reason you want to keep this # plt.show()
line?
Thanks for the swift reply - I can live with as it is; maybe one could add a line to the Mathplotlib section in the documentation and issue the error message a bit more prominently. Maybe insert a Para with the error message in case of any error would also be nice - in some workflows, errors from filters are easy to be missed.
Ok I've updated the error message to be more specific. It will be part of the next release. Thanks for your report!
pandoc-plot checks if the code for a Matplotlib graph contains
plt.show
{.python}, becauseplt.savefig(...){.python} will fail otherwise. This is correct. Unfortunately, it fails to detect if the
plt.show` line will be in a comment, but **only if the source code is imported from a local file.Works:
with
pie-matplotlib1.py
like so:Does not work:
with
pie-matplotlib2.py
like so: