Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

referencing a plot_directive plot does not work #9346

Closed as not planned
Closed as not planned
Labels
status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Actiontopic: sphinx extension
@quantenschaum

Description

@quantenschaum

Bug report

Bug summary

A figure created withplot_directive and preceeding label cannot be referenced with:ref: or:numref:.

Code for reproduction

.. _bar:Testplot--------.. _foo:..plot::   import matplotlib.pyplot as plt   import numpy as np   plt.hist(np.random.randn(1000), 20)reference to plot::ref:`foo` /:numref:`foo`reference to section::ref:`bar` /:numref:`bar`

Actual outcome

rendered HTML

bildschirmfoto_2017-10-10_18-42-44

LaTeX code

\subsection{Testplot}\label{\detokenize{M01/index:testplot}}\label{\detokenize{M01/index:bar}}\phantomsection\label{\detokenize{M01/index:foo}}\begin{figure}[H]\centering\noindent\sphinxincludegraphics{{index-1}.pdf}\end{figure}reference to plot:\DUrole{xref,std,std-ref}{foo} /\sphinxcode{foo}reference to section: {\hyperref[\detokenize{M01/index:bar}]{\sphinxcrossref{\DUrole{std,std-ref}{Testplot}}}} /\hyperref[\detokenize{M01/index:bar}]{Section\ref{\detokenize{M01/index:bar}}}

Expected outcome

Thefoo references should be links like thebar references.

Matplotlib version

  • Operating system: Linux 4.10.0-35-generic 39~16.04.1-Ubuntu 16.04.3 LTS SMP x86_64 GNU/Linux
  • Matplotlib version: 2.1.0 via pip
  • Python version: 3.5.2
  • Other libraries: Sphinx (sphinx-build) 1.6.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Actiontopic: sphinx extension

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp