````markdown
---
title: "test"
format: html 
keep-md: true
---

```{python}
import numpy as np
import pandas as pd
```

```{python}
#| label: fig-series
#| fig-cap: Tests Series
ts = pd.Series(np.random.randn(1000), index=pd.date_range('1/1/2000', periods=1000))
ts = ts.cumsum()
ts.plot()
```
````

![image](https://user-images.githubusercontent.com/6791940/219355291-5992d372-76d0-4319-9482-b559f2955a36.png)

Mardkown intermediate output 

````markdown
---
title: "test"
format: html 
keep-md: true
---


::: {.cell execution_count=1}
``` {.python .cell-code}
import numpy as np
import pandas as pd

# pd.options.plotting.backend = 'holoviews'
```
:::


::: {#fig-series .cell execution_count=2}
``` {.python .cell-code}
ts = pd.Series(np.random.randn(1000), index=pd.date_range('1/1/2000', periods=1000))
ts = ts.cumsum()
ts.plot()
```

::: {#fig-series-1 .cell-output .cell-output-display execution_count=2}
```
<AxesSubplot: >
```

Tests Series
:::

::: {.cell-output .cell-output-display}
![](test2_files/figure-html/fig-series-output-2.png){#fig-series-2}
:::
:::

````

_Originally posted by @cderv in https://github.com/quarto-dev/quarto-cli/issues/4374#issuecomment-1432957906_
            
cscheid
2023-02-16T11:43:10Z
cderv
bug third-party crossref
v1.4
open
Correctly caption figures produced with pandas `plot()` method
https://github.com/quarto-dev/quarto-cli/issues/4382