help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 3d plotting of measured data


From: rocketsound
Subject: Re: 3d plotting of measured data
Date: Thu, 30 Jul 2015 04:42:17 -0700 (PDT)

I don't get your problem: You are saving your images as PNG but want
LaTeX/tikz to render them? That makes no sense...

Do you know  matlab2tikz <https://github.com/matlab2tikz/matlab2tikz>  ?
It's a pretty good tool and works without problems in Octave. What you want
to do is call matlab2tikz in a way like this

/% Create LaTeX plots
fig = figure;
% Create your plot
cleanfigure('handle', fig);
matlab2tikz('yourGeneretedPlot.tex', ...
            'figurehandle', fig, ...
            'width', '14cm', ...
            'height', '3.5cm', ...
            'parseStrings', false, ...
            'encoding', 'UTF-8', ...
            'showInfo', false);/

You'll end up with a file called /yourGeneretedPlot.tex/ that you can use in
LaTeX. Put the generated file in the same folder were your LaTeX document is
and create an additional folder called /tikzpix/ inside the the same folder.
In your LaTeX document you write something like this

/% Put this in your document header
\usetikzlibrary{external}
\usetikzlibrary{plotmarks}
\pgfplotsset{compat=newest}
\tikzexternalize[optimize=false,prefix=tikzpix/]

% In your document you write
\begin{figure}
        \centering
        \input{yourGeneretedPlot.tex}
        \caption{My Caption.}
        \label{fig:MyLabel}
\end{figure}/

Finally, you need to add an additional paramter to pdflatex. The parameter
is called /-shell-escape/.

With this, pdflatex will create a PDF based on /yourGeneretedPlot.tex/ and
put it into the folder /tikzpix/. It will reuse it until the underlying
TEX-file changes.

Tell me if that helps because your original problem may persist (pdflatex
will fail if the generated TEX-file is to big). There are some solutions
around that try to reduce the density of the original data. You may find
them on your own if you Google for matlab2tikz and file to big or something.



--
View this message in context: 
http://octave.1599824.n4.nabble.com/3d-plotting-of-measured-data-tp4671771p4671902.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]