Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

BUG REPORT: embedding external content via xrefs

Abstract

A small demo embedding external content via xref. The content should be present in web and pdf exports, however it appears only in web.

Directly with the inline ![](xref:) syntax

Loading...

Passing the reference to the figure directive

import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.scatter("Horsepower", "Miles_per_Gallon",
           c="Acceleration", data=data.cars())
_ = ax.set(xlabel="Horsepower", ylabel="Miles per gallon",
       title="Horsepower and miles per gallon")

A matplotlib image of the cars data from the myst guide

Same for Internal Reference

<Figure size 600x450 with 1 Axes>

This is a sine wave, from a different document in the same project