I can plot functions with numbers using pgfplots but how can I plot something like the next image?

function with literals

The curved part corresponds to an exponential with negative argument.

  • Can you edit-in what you have? It will be easier for someone here to control the labeling specifically if they can start from a plot that looks sort of like what you want :) That said, I would probably do this with just plain ole' TikZ using control curves. Oct 1, 2014 at 17:03
  • Plotting a line and then an exponential controlling their domain it is not what you want?
    – Astrinus
    Oct 1, 2014 at 17:05
  • @Astrinus Something like it. But I don't know how to put that the function begins in Vo and end in Vs because aren't numbers. Oct 1, 2014 at 17:09

1 Answer 1

\draw[->] (-1,0) -- (5,0) node [below] {$t$};
\draw[->] (0,0) -- (0,4.5)  node [left] {$v(t)$};

\draw [domain=-1:0, scale=1,red,very thick] plot (\x,1);
\draw [domain=0:5, scale=1,red,very thick] plot (\x,{3*(1-exp(-\x))+1}); 
\draw [domain=0:5, scale=1, dashed,blue] plot (\x,4); 

\node[right] at (0,1) {$V_0$} ;
\node[left]   at (0,4) {$V_s$} ;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .