At the site you linked to there it says that is what you should expect in the notebook and only after rendering with latex/pdf conversion will it show. That seems to be different than maybe what you want given the title of your post, perhaps?
There are other ways that will show in the active and static notebook. One is to combine markdown text and images. (The seventh cell here illustrates accomplishing something similar with code. You could, of course, do something similar in just a markdown code cell.) Another is to use Pillow or matplotlib to composite text and an image.
But it could be or at least make it tracked elsewhere. You could use a generator to get the next available number. Or could make a dictionary or enum for it and track it that way. That way you can refer to it later via that variable, if you happen to be using python markdown for your narrative.
Thanks for your help. I am having another issue where the text of the figure in conflicting with the text from the x axis. I have tried to play with the numbers to align it correct but that doesn’t seem to work. I have included an image of the issue. Thanks for your help.
You should just need to adjust the y value in the figtext placement.
Because it is always easier to have some code and examples that can be directly run when trying to debug, I made a gist of a demonstration notebook here. (In addition, I noted when trying to use the code I myself placed in code blocks at Discourse that the quotes messed up in the notebook it seems. So this allows you to use example code direct.)
If you need a place to easily run it, go here and press launch bendit and upload the notebook by drag and drop into the file navigation panel on the right, assuming you have already downloaded it to your local machine from the gist. There isn’t anything magical about that environment that launches in the Jupyter Lab session other than it has recent plotting packages and it was handy.
If your code isn’t behaving like that you want to post toy data with your code, I’d be happy to debug if it isn’t working well. One tip is that often you’ll find different behavior depending on when in the figure building process you invoke objects. Another thing I’d suggest testing things in a clean notebook in your environment. That way you can rule out some code earlier in your notebook causing an issue.