%% Figure Environment Template
%% Auto-generated by ggen from RDF ontology

\begin{figure}[{% raw %}{{ placement | default(value="htbp") }}{% endraw %}]
\centering

{% raw %}{% if is_subfigure %}
{% for subfig in subfigures %}
\begin{subfigure}[b]{{{ subfig.width | default(value="0.45\\textwidth") }}}
  \centering
  {% if subfig.type == "image" %}
  \includegraphics[width=\textwidth]{{{ subfig.path }}}
  {% elif subfig.type == "tikz" %}
  \input{{{ subfig.path }}}
  {% elif subfig.type == "pgfplots" %}
  \input{{{ subfig.path }}}
  {% endif %}
  \caption{{{ subfig.caption }}}
  \label{fig:{{ subfig.id }}}
\end{subfigure}
{% if not loop.last %}
\hfill
{% endif %}
{% endfor %}
{% else %}
{% if figure_type == "image" %}
\includegraphics[width={{ width | default(value="0.8\\textwidth") }}]{{{ image_path }}}
{% elif figure_type == "tikz" %}
\input{{{ tikz_path }}}
{% elif figure_type == "pgfplots" %}
\input{{{ pgfplots_path }}}
{% elif figure_type == "external" %}
\includegraphics[width={{ width | default(value="0.8\\textwidth") }}]{{{ external_path }}}
{% endif %}
{% endif %}{% endraw %}

\caption{% raw %}{% if short_caption %}[{{ short_caption }}]{% endif %}{{{ caption }}}{% endraw %}
\label{% raw %}{fig:{{ figure_id }}}{% endraw %}

{% raw %}{% if source %}
\small\textit{Source:} {{ source }}
{% endif %}{% endraw %}

\end{figure}

{% raw %}{% if notes %}
\noindent \textbf{Note:} {{ notes }}
{% endif %}{% endraw %}
