3

I'm trying to set only one label for each contour line, but all the solution for closed contour line failed for open contour lines, like the option label distance=10000pt. How can I do this?

\documentclass[12pt]{standalone}
\usepackage[brazilian]{babel}
\usepackage{upgreek}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{intersections}
\pgfplotsset{compat=1.13,translate gnuplot=true}
\usepackage{xargs}
\usepackage{scalerel,relsize}
\DeclareMathSizes{12}{12}{7}{5}

\def\g(#1,#2,#3,#4,#5,#6,#7,#8,#9){ 1 + (#8)*exp(-(#3)*(#5)^(-1)) + (#9)*exp(-(#1)*(#5)^(-1)) }%(R)

\def\f(#1,#2,#3,#4,#5,#6,#7,#8,#9){ 1 + (#8)*exp(-(#4)*(#5)^(-1)) + (#9)*exp(-(#2)*(#5)^(-1)) }%(T)


\def\v(#1,#2,#3,#4,#5,#6,#7,#8,#9){ ( (\g(#1,#2,#3,#4,#5,#6,#7,#8,#9))*(#8)*exp(-(#3)*(#5)^(-1)) + (\f(#1,#2,#3,#4,#5,#6,#7,#8,#9))*(#8)*exp(-(#4)*(#5)^(-1))*(#7)*exp(-(#6)*(#5)^(-1)) )*( ((\g(#1,#2,#3,#4,#5,#6,#7,#8,#9)))**2 + (exp(-(#6)*(#5)^(-1)))*( (\f(#1,#2,#3,#4,#5,#6,#7,#8,#9)))**2 )^(-1) }


\begin{document}
\begin{tikzpicture}

\begin{axis}[view={0}{90},
tick label style={font=\scriptsize},
    label style={font=\scriptsize}
    ylabel=$\upgamma_{\scaleto{RT}{3pt}}$,               
        xlabel=${[S](\upmu M)}$ / ${[H_2O]}$,
        grid=major,
        xmax=1, xmin=0,
        ymax=20, ymin=0.1,
        domain=0:1,
    y domain=0.1:20 ] 


\addplot3[contour gnuplot={levels={0.1,0.9},labels over line,label distance=10000pt},samples=100]
    gnuplot { \v(0,0,-12,-20,1,y,1,x/10^6,0) };



\end{axis}

\end{tikzpicture}

\end{document}
  • I'm sorry, your code produces a dimension too large error. How precisely do you compile it? – user121799 Jul 28 '18 at 5:08
  • label distance=10000pt was too much. 1000pt is working fine now here. – Thales Souza Freire Jul 28 '18 at 12:37
  • Someone knows how to solve this? – Thales Souza Freire Jul 29 '18 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.