GeneralHow to enter figures and graphs from excel

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
nathangordon
Posts: 1
Joined: Fri Sep 12, 2008 4:48 pm

How to enter figures and graphs from excel

Post by nathangordon »

I am a first time user of TeXnicCenter and I have to insert a graph from excel and many different pictures. First how do I transfer the graph into this program and second i know how to import pictures but how do i but them exactly where i want them.
Thank you,
Nathan

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

How to enter figures and graphs from excel

Post by Stefan Kottwitz »

Hi Nathan,

welcome to the board!
With pdflatex, that means with the output profile LaTeX => PDF of TeXnicCenter, you can include graphics in pdf, png and jpg format, pdf is recommendable for best quality if the picture isn't already in raster format like jpg oder png.
Try to export the excel graph to pdf format, if possible. I don't use Excel because I'm working with Linux, so I cannot provide exact information about Excel. In LaTeX you could use \includegraphics{filename}, without extension, and load graphicx in your preamble: \usepackage{graphicx}.

To get detailed information about inclusion and positioning of graphics have a look at those documents:
Concerning exact placement of figures have a look at this short summary:
Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to enter figures and graphs from excel

Post by localghost »

nathangordon wrote:[...] First how do I transfer the graph into this program and second i know how to import pictures but how do i but them exactly where i want them. [...]
You can try excel2latex for converting your Excel charts to LaTeX source code. It's unsure if this tool works with recent versions of Excel. The current version of Excel is said to be able to save diagrams directly as PDF. Since I do not use Excel, I can't tell for sure. I suggest to prepare your graphs with other programs.
  • For easy visualization of data sets you can use GnuPlot, which is based on a script language and offers many different file formats for export.
  • Qtiplot is a data processing tool and calls itself an Origin clone. It has a GUI and makes it easy to prepare graphs.
  • SciDAVis is a fork of Qtiplot and offers the same capabilities. It comes with a Windows installer.
All these programs require that you save your data sets as CSV files (comma separated value) with Excel.

Stefan already gave very useful hints about placing floats in the document. I want to supplement some basic measures. From my experience the best placement of floats is achieved by a special list of options. Take this as an example.

Code: Select all

\begin{figure}[!ht]
  \centering
  \rule{4cm}{3cm}
  \caption{Dummy figure}\label{fig:dummy}
\end{figure}
If you insist on your float to be placed exactly were you declared it in the source, you can take the caption package and use its \captionof command, as mentioned on the page behind the last link given by Stefan. The documentation explains in detail what to do.


Best regards and welcome to the board
Thorsten¹
brlnd
Posts: 15
Joined: Wed Sep 17, 2008 6:50 pm

Re: How to enter figures and graphs from excel

Post by brlnd »

Though not free software, http://www.wmf2eps.de.vu/ can be used, and the resulting eps can be converted to pdf by MikTeX's epstopdf. wmf2eps converts Microsoft's aging WMF (Windows Metafile) format, which is the vector graphics format used by Microsoft Office.
Post Reply