Open kjczarne opened 1 year ago
Ok, I've found a workaround for sympy
which relies on not showing the figure and calling plt.show()
explicitly:
fig = plot(p.subs({"a": 3, "b": 5}), show=False)
plt.show()
This is a workaround. I am wondering if I'm missing some detail here. 🙂
Hi @kjczarne, this feature only works if you try to show the plot via plt.show()
as it searches through your code, generates an image and embeds the image in the note. It doesn't work if you call another method
Hi @twibiral, got it, thanks for the clarification. Feel free to close the issue if there are no plans to implement support for other functions that call plt.show()
underneath. 🙂
@kjczarne it's hard to implement this in a reliable way for all functions that are named plot(). We will maybe consider this sometime in the future
Hi,
I've noticed that the plugin seems to use the
agg
backend whenever I use a library likesympy
and use the plotting facilities from there.For example, the following code works perfectly:
But the following does not:
I am getting:
It seems like a bug to me although I'm open to workarounds.
Thanks for creating this plugin, it's on a great way towards cutting out Jupyter Notebooks from my workflow in favor of Obsidian!