# How to change global figure setting?

I did

\floatstyle{boxed}
\restylefloat{figure}


so all of my figures are with frames. This works well, but there is a place I do not want frame, how can I change it locally?

Once you create a figure, it is set in a box that can move around. However, once set, it stays as is. So, you can temporarily change the style by localizing a change and restyling:

\documentclass{article}
\usepackage{float,graphicx}% http://ctan.org/pkg/{float,graphicx}
\floatstyle{boxed}
\restylefloat{figure}
\begin{document}
\begin{figure}
\includegraphics[width=\linewidth,height=3\baselineskip]{example-image-a}%
\caption{This is figure one}
\end{figure}
{\floatstyle{plain}
\restylefloat{figure}
\begin{figure}
\includegraphics[width=\linewidth,height=3\baselineskip]{example-image-b}%
\caption{This is figure two}
\end{figure}
}
\begin{figure}
\includegraphics[width=\linewidth,height=3\baselineskip]{example-image-c}%
\caption{This is figure three}
\end{figure}

\end{document}


It's best though, for the sake of consistency, to wrap this in your own environment, which also localizes the effect:

\newenvironment{noboxfigure}[1][ht]
{\floatstyle{plain}\restylefloat{figure}%
\begin{figure}[#1]
}{\end{figure}}

• seems I misunderstand sth, I always produce an error: ! Package caption Error: For a successful cooperation of the `wrapfig' package. – Ginger Sep 12 '13 at 18:06
• @Ginger: Could you please include a minimal working example (MWE) that includes the packages you're using. Something that replicates your current setup, and reproduces the error if you use my suggestion. Do this via an edit to your original question. – Werner Sep 12 '13 at 18:24