Smooth curve with tikz

chemistrycolorcurve fittinggraphstikz-styles

This graph shows the effect of catalysts on activation energy

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[full]{textcomp}
\usepackage[greek,italian]{babel}
\usepackage[margin=2cm,top=1cm,headheight=16pt,headsep=0.1in,heightrounded]{geometry}
\usepackage{amsmath,amssymb,amsfonts,systeme,mathtools} 
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[>=latex]
\centering
\draw[<->](0,5)node[above,rotate=90,xshift=-2cm]{Energia (kcal)}|-
(5,0)node[below,xshift=-2cm]{Coordinata di reazione}; 

\draw[violet,line width=0.4mm](0,2.5)--(1,2.5) node [below] {reagenti};
\draw[violet,line width=0.4mm](3.9,1)--(4.7,1) node [below] {prodotti};

\draw[red,line width=0.4mm] (1,2.5) to[in=180, out=0, looseness=.65] (2.35,4.5) 
                                        to[in=180, out=0, looseness=.65] (3.9,1);

\draw[blue,line width=0.4mm] (1,2.5) to[in=180, out=0, looseness=.65] (2.35,3.75) 
                                                  to[in=180, out=0, looseness=.65] (3.9,1);

\draw[dotted](1,2.5)--(6,2.5);
\draw[dotted](2.35,4.5)--(5,4.5);
\draw[dotted](2.35,3.75)--(6,3.75);
\draw[stealth-stealth](5,2.5) -- (5,4.5);
\draw[stealth-stealth](6,3.75) -- (6,2.5);

\node[inner sep=0pt, label={45:\textcolor{red}{$E_\text{a}$}}] at (5,2.5) {} ;
\node[inner sep=0pt, label={45:\textcolor{blue}{$E_\text{a}$}}] at (6,2.5) {} ;


\draw[red,line width=0.4mm] (8,3.5)--(9,3.5) node[text=black,right,yshift=1.25pt]{reazione non catalizzata};
\draw[blue,line width=0.4mm] (8,3)--(9,3) node[text=black,right,yshift=1.25pt]{reazione catalizzata};
\end{tikzpicture}

\end{document}

enter image description here

Is it possible to draw the curves more smoothly? in particular, minimize smudging with the two straight lines \draw[violet,line width=0.4mm](0,2.5)--(1,2.5) node [below] {reagenti}; and
\draw[violet,line width=0.4mm](3.9,1)--(4.7,1) node [below] {prodotti};?

Any other advice to improve this graph is welcome.

Best Answer

While you are waiting for Tikz-specific help, here is an alternative in Metapost, wrapped up in luamplib. I believe you can use the same approach to defining a path in Tikz with the hobby package.

enter image description here

You would need to compile this with lualatex, and to have the TeX Gyre Termes fonts available on your system.

\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\usepackage{unicode-math}
\setmainfont{TeX Gyre Termes}
\setmathfont{TeX Gyre Termes Math}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}

vardef reaction(expr w, h, d) = 
    clearxy;
    for i=0 upto 4: x[i] = w/4 * i; endfor
    x2 := 7/8 x2; % adjust peak left
    y0 = y1 = 0;
    y3 = y4 = d;
    y2 = h;
    z0 .. 1/2[z0, z1] .. controls z1 
       .. 1/8[z1, z2] .. controls z2 
       .. 1/2[z2, z3] .. controls z3 
       .. 1/2[z3, z4] .. z4
enddef;

beginfig(1);
path xx, yy;
xx = (origin -- right) scaled 300;
yy = (origin -- up) scaled 240;

path cat, dog;
cat = reaction(300, 100, -50) shifted 100 up;
dog = reaction(300, 150, -50) shifted 100.5 up;

z0 = point 0 of cat;
z1 = directionpoint right of subpath (2, 3) of cat;
z2 = directionpoint right of subpath (2, 3) of dog;

draw z0 -- (xpart point 5 of cat, y0) dashed withdots scaled 1/2;
draw z1 -- (xpart point 5 of cat, y1) dashed withdots scaled 1/2;
draw z2 -- (xpart point 4 of cat, y2) dashed withdots scaled 1/2;

path E[]; 
E1 = (xpart point 4 of cat, y2) -- (xpart point 4 of cat, y0); 
E2 = (xpart point 5 of cat, y1) -- (xpart point 5 of cat, y0); 
drawdblarrow E1; 
drawdblarrow E2; 

drawoptions(withcolor 2/3 red);
label.lft("$E_a$", point 1/2 of E1);
draw dog;
label.ulft("\begin{tabular}{c}reazione non\\catalizzata\end{tabular}", point 2.3 of dog);

drawoptions(withcolor 3/4 blue);
label.lft("$E_a$", point 1/2 of E2);
draw cat;
label("\begin{tabular}{c}reazione\\catalizzata\end{tabular}", z1 shifted 28 down);

drawoptions();

% show the points along the path...
% for i=0 upto length cat: draw fullcircle scaled 3 shifted point i of cat; endfor

drawarrow xx; label.llft("Coordinata di reazione", point 1 of xx);
drawarrow yy; label.llft(textext("Energia (kcal)") rotated 90, point 1 of yy);

label.lrt("reagenti", point 0 of cat);
label.llft("prodotti", point 5 of cat);

endfig;
\end{mplibcode}
\end{document}
Related Question