Tag Info

Hot answers tagged

5

The \tempheight and \tempwidth went all wrong. With some fine tuning, we get this: \documentclass{report} \usepackage{mwe,subfig,calc} \newlength{\tempheight} \newlength{\tempwidth} \newcommand{\rowname}[1]% #1 = text {\rotatebox{90}{\makebox[\tempheight][c]{#1}}} \newcommand{\columnname}[1]% #1 = text {\makebox[\tempwidth][c]{#1}}% \begin{document} ...


4

Instead of passing scale=0.71 to tikzpicture pass it to the axis options. I have also added ylabel style={anchor=west} to put y label little up. \documentclass[11pt]{memoir} \setstocksize{23cm}{15.9cm} \settrimmedsize{23cm}{15.9cm}{*} \settrims{0pt}{0pt} \settypeblocksize{17.8cm}{11.3cm}{*} \setlrmargins{2.3cm}{*}{*} \setulmargins{6.4\onelineskip}{*}{*} ...


3

\documentclass{article}% always use a complete document not a fragment \usepackage{graphicx} \begin{document} \begin{figure}[htp]% include p % \begin{minipage}{\textwidth} a \textwidth minipage does nothing \centering%\begin{center} % mwe package images \sbox0{\includegraphics[height=4cm]{example-image-a}% no word space ...


3

Use package newfloat, a package designed to work well with caption and friends. \documentclass{article} \usepackage{newfloat} \usepackage{subcaption} \DeclareFloatingEnvironment[name={Supplementary Figure}]{suppfigure} \begin{document} \begin{suppfigure} \begin{subsuppfigure}{.45\textwidth} \centering\rule{.9\linewidth}{2cm} \caption{a small ...


3

You didn't state which package you use to help create the subfigure environments: subfigure -- which is deprecated and ought not to be used anymore -- subfig, or subcaption. I'll assume you're using subcaption. One needs to remember that TeX converts single line breaks into space tokens. Thus, if each subfigure environment is terminated with a newline ...


2

I found a solution. Adding the option trim axis left to the tikzpicture chops off everything left of the axis. Combined with \centering before the subfigure this aligns the plots nicely. \begin{subfigure}[t]{\linewidth} \centering \begin{tikzpicture}[trim axis left] \begin{axis}[my plot] ...


2

Part of the answer was provided in the comments (removing the figure and using the includegraphics directly), but some additional work is required to recover features available in the figure environment. In particular, manual adjustment of the spacing is required, and captions have to be done differently. On the spacing, by default the spacing doesn't ...


2

This avoids the use of floats inside the Exercise environment. \documentclass{scrreprt} \usepackage[margin=.5in]{geometry} \usepackage{exercise} \usepackage[demo]{graphicx} \usepackage{stackengine,lipsum} \newcommand\fourfigures[5]{% \par\medskip{\centering% \stackunder[6pt]{ \stackunder{\includegraphics[width=#1\textwidth]{#2}}{(a)} \qquad% ...


2

I would appear that the figure is supposed to take up much, or even all, of a full page. If this impression is correct, you could use the p ("page") positioning specifier to direct LaTeX to place the float on a page by itself. For good measure, I would also specify the (maximum) height of the graphic to be 0.95\textheight or 0.9\textheight, rather than ...


2

This was fixed using [width=x\linewidth] where x is any number between 0 and 1.


2

You can always use raisebox \documentclass{article} \usepackage{caption,subcaption} \usepackage[demo]{graphicx} \begin{document} \begin{figure}[h!] \centering \begin{subfigure}[b]{.45\linewidth} \includegraphics[draft,width=\linewidth]{example-image} \caption{pic1caption} \end{subfigure} \begin{subfigure}[b]{.45\linewidth} ...


2

You can use groupplot to plot all three of them in a go. Just use \nextgroupplot[hide axis]%2 for the second plot so that it is not plotted. Here is a sample. \documentclass{article} \usepackage{pgfplots,subcaption,siunitx} \pgfplotsset{compat=1.12} \usepgfplotslibrary{groupplots} \begin{document} \begin{figure} \centering ...


1

Below I've used two minipages, one for each algorithm, followed by two more minipages, one for each algorithm caption. The double-usage is required to achieve the appropriate alignment. \documentclass{article} \usepackage{amsmath} \usepackage[noline]{algorithm2e} \begin{document} \begin{figure} \begin{minipage}{0.65\linewidth} \begin{algorithm}[H] ...


1

You can use a node around each subfigure and draw lines later \documentclass{article} \usepackage{graphicx} \usepackage{tikz} \usepackage{subcaption} \begin{document} \begin{figure} \begin{subfigure}[b]{.45\linewidth} \centering \tikz[overlay, remember picture] \node[anchor=south, inner sep=0] (model) ...


1

Once again, minipages are the solution. \documentclass{article} \usepackage{mwe} \usepackage{subcaption} \begin{document} \begin{figure} \centering \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=\linewidth]{example-image} \caption{} \label{fig:prad31} \end{subfigure}\hfill ...


1

You could try floatrow: \documentclass[12pt]{article} \usepackage{caption,floatrow} \DeclareCaptionSubType[alph]{figure} \captionsetup[figure]{labelsep=colon} \captionsetup[subfigure]{labelformat=brace,labelsep=space,labelfont=bf} \floatsetup[subfigure]{capposition=bottom,heightadjust=all,valign=c} \begin{document} \begin{figure}[htp] ...


1

subcaption works well (in an automated way) when using newfloat for float creation. However, if you're using float or floatrow, you're going to have to do the legwork yourself. The following is taken from the subcaption documentation (section 5 The \DeclareCaptionSubType command): For using the sub-caption feature of the caption package some commands ...


1

The magic number is 91=64+27: \documentclass{article} \usepackage{subcaption} \usepackage{graphicx} \newlength{\preferredwidth} \setlength{\preferredwidth}{12cm} \begin{document} \begin{figure} \centering \begin{subfigure}{\dimexpr\preferredwidth*64/91} \includegraphics[width=\linewidth]{example-image-4x3} \caption{Ratio 4:3 landscape} \end{subfigure}% ...


1

You could give floatrow a roll: \documentclass[12pt]{article} \usepackage{caption,floatrow} \DeclareCaptionSubType[alph]{figure} \captionsetup[figure]{labelsep=colon} \captionsetup[subfigure]{labelformat=brace,labelsep=space,labelfont=bf} \floatsetup[subfigure]{capposition=bottom,heightadjust=all,valign=t} \begin{document} \begin{figure}[htp] ...



Only top voted, non community-wiki answers of a minimum length are eligible