
This is the exact code I'm using:
Code: Select all
\begin{figure}[h]
\includegraphics{ferrers.png}
\caption{Examples of Ferrers diagrams. Note that $\mu/\lambda$ is not a border strip.}
\label{fig:ferrers}
\end{figure}
Code: Select all
\begin{figure}[h]
\includegraphics{ferrers.png}
\caption{Examples of Ferrers diagrams. Note that $\mu/\lambda$ is not a border strip.}
\label{fig:ferrers}
\end{figure}
Code: Select all
\includegraphics[scale=0.75]{ferrers.png}
Converting a pixel based format (PNG) to a vector based format (PDF) makes no sense because you can't benefit from advantages of the vector format. The best quality would be achieved by drawing these diagrams by hand with pgf/tikZ. But there will be a learning curve until you get familiar with that.Rc3g wrote:[...] I've tried converting the image to a pdf, and then including the pdf. This makes everything nice and sharp, but once I start cropping (obviously I can't have a single page with just that figure on it), I get the same result as when I included the png. I don't suppose there is anything to do about this either (except scaling)?
I did two examples with pgf/tikZ. The first one with subfigures ...Rc3g wrote:My figure could be drawn very easily (and with acceptable quality) with MetaPost.
Code: Select all
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{font=small,labelfont=sc]{caption}
\usepackage[font=footnotesize][subcaption}
\usepackage{nicefrac}
\usepackage{tikz}
\begin{document}
\begin{figure}[!ht]
\centering
\begin{subfigure}{0.2\linewidth}
\centering
\begin{tikzpicture}[thick]
% \draw[style=help lines] (0,0) grid (3,2);
\foreach \position in {(0,0),(0,0.6),(0,1.2),(0.6,0.6),(0.6,1.2),(1.2,1.2),(1.8,1.2)}
\draw \position rectangle +(0.5,0.5);
\end{tikzpicture}
\caption{$\mu=(421)$}\label{subfig-1:ferrers}
\end{subfigure}
\begin{subfigure}{0.2\linewidth}
\centering
\begin{tikzpicture}[thick]
% \draw[style=help lines] (0,0) grid (3,2);
\foreach \position in {(0,0.6),(0,1.2),(0.6,0.6),(0.6,1.2)}
\draw \position rectangle +(0.5,0.5);
\foreach \position in {(0,0),(1.2,1.2),(1.8,1.2)}
\path \position rectangle +(0.5,0.5);
\end{tikzpicture}
\caption{$\lambda=(22)$}\label{subfig-2:ferrers}
\end{subfigure}
\begin{subfigure}{0.2\linewidth}
\centering
\begin{tikzpicture}[thick]
% \draw[style=help lines] (0,0) grid (3,2);
\foreach \position in {(0,0),(1.2,1.2),(1.8,1.2)}
\draw \position rectangle +(0.5,0.5);
\foreach \position in {(0,0.6),(0,1.2),(0.6,0.6),(0.6,1.2)}
\path \position rectangle +(0.5,0.5);
\end{tikzpicture}
\caption{$\nicefrac{\mu}{\lambda}$}\label{subfig-3:ferrers}
\end{subfigure}
\caption[Examples of \textsc{Ferrers} diagrams]{Examples of \textsc{Ferrers} diagrams. Note that $\nicefrac{\mu}{\lambda}$ is not a border strip.}\label{fig:ferrers}
\end{figure}
\end{document}
Code: Select all
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{font=small,labelfont=sc]{caption}
\usepackage{nicefrac}
\usepackage{tikz}
\begin{document}
\begin{figure}[!ht]
\centering
\begin{tikzpicture}[thick]
% \draw[style=help lines] (0,0) grid (9,3);
\foreach \position in {(0,0),(0,0.6),(0,1.2),(0.6,0.6),(0.6,1.2),(1.2,1.2),(1.8,1.2)}
\draw \position rectangle +(0.5,0.5);
\draw (1.5,2) node[above] {\small $\mu=(421)$};
\begin{scope}[xshift=3cm]
\foreach \position in {(0,0.6),(0,1.2),(0.6,0.6),(0.6,1.2)}
\draw \position rectangle +(0.5,0.5);
\draw (1.5,2) node[above] {\small $\lambda=(22)$};
\end{scope}
\begin{scope}[xshift=6cm]
\foreach \position in {(0,0),(1.2,1.2),(1.8,1.2)}
\draw \position rectangle +(0.5,0.5);
\draw (1.5,2) node[above] {\small $\nicefrac{\mu}{\lambda}$};
\end{scope}
\end{tikzpicture}
\caption[Examples of \textsc{Ferrers} diagrams]{Examples of \textsc{Ferrers} diagrams. Note that $\nicefrac{\mu}{\lambda}$ is not a border strip.}\label{fig:ferrers}
\end{figure}
\end{document}
Code: Select all
\documentclass{article}
\usepackage{asymptote}
\begin{document}
\begin{figure}
\centering
\begin{asy}
unitsize(6mm);
struct Ferrer {
static path Box = box((0, 0), (0.8, -0.8));
static int offset = 0;
bool[][] values;
bool get(int i, int j) {
return values.initialized(i) && values[i].initialized(j) && values[i][j];
}
void set(int i, int j) {
if(!values.initialized(i)) values[i] = new bool[];
values[i][j] = true;
}
void operator init(...int[] r) {
for(int i = 0; i < r.length; ++i) {
for(int j = 0; j < r[i]; ++j) set(i,j);
}
}
void Draw(string L) {
int n = 0;
for(int i = 0; i < values.length; ++i) {
n = max(n, values[i].length);
for(int j = 0; j < values[i].length; ++j) {
currentpen = get(i,j) ? defaultpen : nullpen;
draw(shift(offset+j, -i) * Box);
}
}
label(L, (offset+n/2, 0), N, defaultpen);
offset += n+2;
}
}
Ferrer operator/(Ferrer L, Ferrer R) {
Ferrer result;
for(int i = 0; i < L.values.length; ++i) {
for(int j = 0; j < L.values[i].length; ++j) {
if(L.get(i,j) && !R.get(i,j)) result.set(i,j);
}
}
return result;
}
Ferrer mu = Ferrer(4, 2, 1);
Ferrer lambda = Ferrer(2, 2);
mu.Draw("$\mu = (421)$");
lambda.Draw("$\lambda = (22)$");
(mu/lambda).Draw("$\mu/\lambda$");
\end{asy}
\caption{Examples of \textsc{Ferrers} diagrams. Note that $\mu/\lambda$ is not a border strip.}
\end{figure}
\end{document}