Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No displayed output when embedding glued figures from another page/notebook #591

Open
markusritschel opened this issue Apr 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@markusritschel
Copy link

Describe the bug

When I want to embed glue output from other pages, it works with variables but not with figures.

Reproduce the bug

In my jupyter notebook examples/test.ipynb, I have created the following glue object:

# ... create some fig = plt.figure() object ...
from myst_nb import glue
my_variable = "here is some text!"
glue("my_text", my_variable, display=False)
glue("my_figure", fig, display=False)

Now, outside that notebook, in another markdown file, the directive

{glue}`examples/test.ipynb::my_text`

yields the expected output 'here is some text!'.

However, the directive

{glue}`examples/test.ipynb::my_figure`

only returns <Figure size 640x480 with 1 Axes>, without displaying the actual graphic.
The following variants don't return anything at all:

{glue:figure}`examples/test.ipynb::my_figure`

```{glue} examples/test.ipynb::my_figure
```

```{glue} examples/test.ipynb::my_figure
```

List your environment

I'm running the following configuration:

❯ jupyter-book --version                           
Jupyter Book      : 1.0.0
External ToC      : 1.0.1
MyST-Parser       : 2.0.0
MyST-NB           : 1.0.0
Sphinx Book Theme : 1.1.2
Jupyter-Cache     : 1.0.0
NbClient          : 0.10.0
@markusritschel markusritschel added the bug Something isn't working label Apr 11, 2024
Copy link

welcome bot commented Apr 11, 2024

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant