Skip to main content
added 31 characters in body
Source Link
rm -rf
  • 89.3k
  • 21
  • 297
  • 479

Mathematica export

Just export the data such that in one column you have the x-coordinates and in another you have the y-coordinates.

DataTable = {{9/50, 5.00251*10^9, 3.02252*10^9, 2.17472*10^9, 1.97472*10^9},<<1000>>};
DataTableWithHeader = Flatten[{{{"ColumnX", "ColumnY1", "ColumnY2", "ColumnY3", "ColumnY4"}}, DataTable}, 1];
Export["Energy.csv", DataTableWithHeader];

$\LaTeX$ import and compiling

You now can use a compiler like pdflatex to create your plots from a $\LaTeX$-file like the folowing - like you desire.

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
    xlabel={xlabel},
    ylabel={ylabel}]
\addplot[color=blue,mark=none] 
    table [x expr=\thisrowno{0},y expr=\thisrowno{1},col sep=comma]{Energy.csv};
\addplot[color=blue,mark=none] 
    table [x expr=\thisrowno{0},y expr=\thisrowno{2},col sep=comma]{Energy.csv};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
    xlabel={xlabel},
    ylabel={ylabel}]
\addplot[color=blue,mark=none] 
    table [x expr=\thisrowno{0},y expr=\thisrowno{1},col sep=comma]{Energy.csv};
\addplot[color=blue,mark=none] 
    table [x expr=\thisrowno{0},y expr=\thisrowno{2},col sep=comma]{Energy.csv};
\end{axis}
\end{tikzpicture}
\end{document}

The resulting images might look like the following example.

Illustration created with pgfplots

Mathematica export

Just export the data such that in one column you have the x-coordinates and in another you have the y-coordinates.

DataTable = {{9/50, 5.00251*10^9, 3.02252*10^9, 2.17472*10^9, 1.97472*10^9},<<1000>>};
DataTableWithHeader = Flatten[{{{"ColumnX", "ColumnY1", "ColumnY2", "ColumnY3", "ColumnY4"}}, DataTable}, 1];
Export["Energy.csv", DataTableWithHeader];

$\LaTeX$ import and compiling

You now can use a compiler like pdflatex to create your plots from a $\LaTeX$-file like the folowing - like you desire.

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
    xlabel={xlabel},
    ylabel={ylabel}]
\addplot[color=blue,mark=none] 
    table [x expr=\thisrowno{0},y expr=\thisrowno{1},col sep=comma]{Energy.csv};
\addplot[color=blue,mark=none] 
    table [x expr=\thisrowno{0},y expr=\thisrowno{2},col sep=comma]{Energy.csv};
\end{axis}
\end{tikzpicture}
\end{document}

The resulting images might look like the following example.

Illustration created with pgfplots

Mathematica export

Just export the data such that in one column you have the x-coordinates and in another you have the y-coordinates.

DataTable = {{9/50, 5.00251*10^9, 3.02252*10^9, 2.17472*10^9, 1.97472*10^9},<<1000>>};
DataTableWithHeader = Flatten[{{{"ColumnX", "ColumnY1", "ColumnY2", "ColumnY3", "ColumnY4"}}, DataTable}, 1];
Export["Energy.csv", DataTableWithHeader];

$\LaTeX$ import and compiling

You now can use a compiler like pdflatex to create your plots from a $\LaTeX$-file like the folowing - like you desire.

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
    xlabel={xlabel},
    ylabel={ylabel}]
\addplot[color=blue,mark=none] 
    table [x expr=\thisrowno{0},y expr=\thisrowno{1},col sep=comma]{Energy.csv};
\addplot[color=blue,mark=none] 
    table [x expr=\thisrowno{0},y expr=\thisrowno{2},col sep=comma]{Energy.csv};
\end{axis}
\end{tikzpicture}
\end{document}

The resulting images might look like the following example.

Illustration created with pgfplots

Source Link
strpeter
  • 275
  • 2
  • 12

Mathematica export

Just export the data such that in one column you have the x-coordinates and in another you have the y-coordinates.

DataTable = {{9/50, 5.00251*10^9, 3.02252*10^9, 2.17472*10^9, 1.97472*10^9},<<1000>>};
DataTableWithHeader = Flatten[{{{"ColumnX", "ColumnY1", "ColumnY2", "ColumnY3", "ColumnY4"}}, DataTable}, 1];
Export["Energy.csv", DataTableWithHeader];

$\LaTeX$ import and compiling

You now can use a compiler like pdflatex to create your plots from a $\LaTeX$-file like the folowing - like you desire.

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
    xlabel={xlabel},
    ylabel={ylabel}]
\addplot[color=blue,mark=none] 
    table [x expr=\thisrowno{0},y expr=\thisrowno{1},col sep=comma]{Energy.csv};
\addplot[color=blue,mark=none] 
    table [x expr=\thisrowno{0},y expr=\thisrowno{2},col sep=comma]{Energy.csv};
\end{axis}
\end{tikzpicture}
\end{document}

The resulting images might look like the following example.

Illustration created with pgfplots