Skip to content

Commit 6cb5c1b

Browse files
committed
Label images so that they can be referenced
1 parent f2c8c23 commit 6cb5c1b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sphinx_gmt/gmtplot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
{%- endif %}
6262
6363
.. figure:: {{ image }}
64+
:name: {{ label }}
6465
{% for option in image_opts -%}
6566
{{ option }}
6667
{% endfor %}
@@ -440,6 +441,7 @@ def run(self):
440441
gmtplot_block = (
441442
jinja2.Template(TEMPLATE)
442443
.render(
444+
label="gmtplot-" + output_base,
443445
show_code=self.options["show-code"],
444446
code=builddir_link / code_file.name,
445447
code_opts=code_opts,

0 commit comments

Comments
 (0)