I am trying to find the intersection 2 plots in pgfplots and extract the x-values onto a pgfplotstable?

Here is a code where Symm and Load plots intersect and I could to get the x-value of intersection, but when I try to store the value using \pgfplotstableread, I am getting error. Also, error pops when I try to append the row value to table1.

enter image description here

%% Preamble    
%For getting gnuplot coordinates

 /pgf/declare function={
% drain current above pinch off
% drain current below pinch off
\begin{tikzpicture}[transform shape, scale=0.75]
xmin=-0.1, xmax=15.5,
axis line style={<->},
axis x line=middle,
axis y line=middle,

\pgfplotstableread[row sep=\\,col sep=comma, columns={x,y}]{
x,y \\
1, 13 \\

\addplot[draw=none,name path global={load}, blue, samples=10, domain=0:15]{5-(\x/3)};

\addplot[name path global={Symm}, smooth, cyan, samples=101, domain=0:15] {
    (\x<#1*0.5-\Vt) ? Idc(\Kn,\lamda,\WL,#1*0.5,\Vt,\x) : Idb(\Kn,\lamda,\WL,#1*0.5,\Vt,\x)
     \path[name intersections={of={Symm} and {load}, by={point#1}, name=j}](j-1)
    \pgfmathparse{\len/\plotwidth*15}%since xmax=15

\pgfplotstableread[row sep=\\,col sep=comma, columns={x,y},
columns/y/.style={numeric type}
x,y \\
1, \macrox \\   <- *Error 1: ! Package PGF Math Error: Could not parse input '' as a floating point number, sorry. The unreadable part was near ''..*

    % Concatenate

%%% <- Error 2: ! Undefined control sequence. \sum ->\pgfpl@@{x}\pgfpl@@ {y }l.378 };
 %  \pgfplotstablevertcat{\table1}{\sum} 


  • pgfplotstable only reads data off files, OTOH, you can create a comma delimited string of values using \xdef. A similar approach was used in tex.stackexchange.com/questions/449138/… for extra x ticks. Commented Jun 21, 2019 at 13:55
  • If you want others to seriously look at your problem, provide a minimal example that, apart from the reported issue, is compilable. It should start with \documentclass and end with \end{document} and should have all commands like \getvalue defined.
    – user121799
    Commented Jun 21, 2019 at 19:53
  • I have added the preambles. Help me in getting out the values of intersects on a table.
    – Raja
    Commented Jun 22, 2019 at 2:31


You must log in to answer this question.

Browse other questions tagged .