Graphics, Figures & TablesGraph Troubleshooting

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Vayth1000
Posts: 1
Joined: Wed May 12, 2021 1:17 am

Graph Troubleshooting

Post by Vayth1000 »

Code: Select all

\begin{figure}[h]
        \begin{tikzpicture}
            \begin{axis}[
            xlabel={$\sqrt{T}\ \ in\ \ K$},ylabel={$Viskosität \eta \ \ in\ \ \frac{kg}{m s}$},
            ymin=0.000029,xmax=18.60,ymax=0.000037,xmin=17.00,xtick={0},ytick={0},height=10cm,width=14cm,
            xlabel style={at={(ticklabel cs:.5,-.4)}},ylabel style={at={(ticklabel cs:.-.5,-.4)}},
            legend style={legend cell align=right,legend plot pos=right},
            xtick={17.00,17.20,17.40,17.60,17.80,18.00,18.20,18.40,18.60},ytick={0.000029,0.000030,0.000031,0.000032,
            0.000033,0.000034,0.000035,0.000036,0.000037}, grid=both,
           legend style={at={(0.50,0.84)}} ]


                       \addplot [only marks,mark size=2pt,blue] table            {GaseVis.txt};
                \addlegendentry[text depth=2ex,anchor=mid west]{Messreihe 1}
             \end{axis}
        \end{tikzpicture}
        \caption{Viskosität des Gases als Funktion $\sqrt{T}$}
    \end{figure}
i don't know where I made my mistake. texmaker says: illegal unit of measure (pt inserted)
ty for help :)
Last edited by Stefan Kottwitz on Wed May 12, 2021 11:56 am, edited 1 time in total.
Reason: code marked

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Graph Troubleshooting

Post by Bartman »

Please link your crossposts.

As has been noted in the other forum, the dot before -.5 in the assignment to the ylabel style option causes the problem.
Post Reply