3

I am exporting plots from matlab with the matlab2tikz package. While this works just fine, I now want to insert some lines and text to describe the plot. I have multiple plots which are to be labelled but which have different coordinate systems. That is why the labels and lines are not in the same place if they refer to the coordinate system of the plot. Here is where it works well.

output of the correctly appearing plot

Here is where it looks incorrect.

Wrong

Both are included in a wrapping tex document, which includes both of them like this:

\begin{figure}[H]
\centering
\newlength\figureheight 
\newlength\figurewidth 
\setlength\figureheight{0.5\textheight} 
\setlength\figurewidth{\textwidth} 

\input{graphen/dotierung.tikz}
\caption{Energieverläufe $V$}
\end{figure}

I already played around a little with the coordinates but I have to change the y-Axis coordinate totally in order to have a pleasing result. That seems to be caused by the completely different scaling of the two plots. Now, is there a way to use the same coordinates on both plots for the lines and the text? It is important that the labels keep their relative positions when I scale the plots.

  • I export matlab data using dlmwrite, that allows you to export a data matrix where each column represent a variable. I open the data exported file and write the variable label at first row, then import the data file using pgfplots. It's pretty easy to manipulate and configure. – OSjerick Nov 23 '13 at 19:18
  • Welcome to TeX.SX! Does this help tex.stackexchange.com/q/9559/18228? – Herr K. Nov 23 '13 at 20:03
  • @KevinC Not exactly, I tried that already but my tikz file is not an image. That is why using the commands in the link throws some errors. I will look into dlmwrite! – adrian Nov 24 '13 at 16:41
4

If I understand you correctly you want the position of the lines and arrows, relative to the axes, to be the same in both plots. For such cases the rel axis cs coordinate system is helpful. It is a coordinate system which has (0,0) in the lower left of the axis, and (1,1) in the upper right. You can use it as for example \node at (rel axis cs:0.5,0.5) {stuck in the middle};, which will place that node in the centre of the axis, regardless of what x and y ranges are.

I would also suggest drawing the arrows and adding the text labels in the same path, that makes it easy to place the text above the middle of the arrow, no need to define a helper \coordinate.

While not necessary, I defined some macros to hold some values that are used several times:

\newcommand\rely{0.5} % relative y-coord for lines
\newcommand\xA{0.1}   % relative x-coord for first vertical line
\newcommand\xB{0.16}  % relative x-coord for second vertical line
\newcommand\xC{0.6}   % relative x-coord for third vertical line

These are then used to draw the vertical lines and arrows with labels as follows:

\begin{scope}[
   line width=1pt,
   myarrowlabel/.style={anchor=west,rotate=90,fill=white}
   ]
% vertical lines
\draw[dashed] (rel axis cs:\xA,0) -- (rel axis cs:\xA, 1);
\draw[densely dotted] (rel axis cs:\xB,0) -- (rel axis cs:\xB, 1);
\draw[dashed] (rel axis cs:\xC,0) -- (rel axis cs:\xC, 1);

% arrows with labels
\draw[<->, shorten >=2pt,shorten <=2pt]
   (rel axis cs:0,\rely)
   --node[myarrowlabel]  {Bahngebiet}
   (rel axis cs:\xA,\rely);

\draw[<-, rounded corners, shorten <=2pt]
   (rel axis cs:\xB,\rely) -- (rel axis cs:\xB+0.05,\rely) --
   (rel axis cs:\xB+0.05,\rely+0.05)
   node[myarrowlabel] {Sperrschicht};

\draw[<->, shorten >=2pt,shorten <=2pt]
   (rel axis cs:\xC,\rely)
   --node[myarrowlabel] {Bahngebiet}
   (rel axis cs:1,\rely);
\end{scope}

Having the relative positions saved as macros makes it easy to move them around. If you want a different y-position for the second plot, you could use \renewcommand\rely{<value of your choice>}. Less work than changing the same number seven times.

You can place the above code either before or after the \addplot commands. If you place them before, the text will be placed behind the plot lines, if placed after the text is placed above the plot lines.

Complete code, with output below:

\documentclass[tikz,border=0.125cm]{standalone}
\usepackage{pgfplots,amsmath,nicefrac}
\pgfplotsset{grid style={dashed,black}}
\newlength\figureheight 
\newlength\figurewidth 
\setlength\figureheight{7cm} 
\setlength\figurewidth{15cm} 

\newcommand\rely{0.5} % relative y-coord for lines
\newcommand\xA{0.1}   % relative x-coord for first vertical line
\newcommand\xB{0.16}  % relative x-coord for second vertical line
\newcommand\xC{0.6}   % relative x-coord for third vertical line
\begin{document}


\begin{tikzpicture}

\begin{axis}[%
width=\figurewidth,
height=\figureheight,
scale only axis,    
xmin=0,
xmax=1,
xlabel={$\nicefrac{x}{\mu \mathrm{m}}$},
xmajorgrids,
ymin=-1.4e+17,
ymax=4e+16,
ylabel={$\nicefrac{1}{\mathrm{cm}^3}$},
ymajorgrids,
title={Raumladungsdichte},
legend style={draw=black,fill=white,legend cell align=left},
xlabel style={font=\Large},
ylabel style={font=\Large}
]

\addplot [
color=black,
solid,
line width=1.0pt
]
table[row sep=crcr]{
0 16384\\
0.0106515660881996 16384\\
0.0213031321763992 16384\\
0.0319546982645988 12288\\
0.0426062494516373 -18432\\
0.0532571598887444 -2041856\\
0.0638988167047501 -142659584\\
0.0744716376066208 -9843961856\\
0.08476971834898 -651543838720\\
0.0945955812931061 -39762698174464\\
0.103908754885197 -1.57405800090829e+15\\
0.112750686705112 -9.38888548214374e+15\\
0.121192403137684 -2.48862452513505e+16\\
0.12932114303112 -4.85063685035786e+16\\
0.137209430336952 -8.62843897380864e+16\\
0.144906640052795 -1.39212130720154e+17\\
0.152468040585518 -9.7504768460587e+16\\
0.159945711493492 3.38447798422733e+15\\
0.167390301823616 2.03459408334684e+16\\
0.174849763512611 1.35208587692605e+16\\
0.18236967921257 1.09764954470482e+16\\
0.189992070198059 1.02727918991442e+16\\
0.197761610150337 1.00771239265567e+16\\
0.205729201436043 1.00219271543521e+16\\
0.213961631059647 1.00062226064343e+16\\
0.222553476691246 1.00017451030282e+16\\
0.231588155031204 1.00004802351596e+16\\
0.241006135940552 1.00001312690668e+16\\
0.250639855861664 1.00000335585608e+16\\
0.260369092226028 9.99999812508058e+15\\
0.270136207342148 9.99996269160038e+15\\
0.279919803142548 9.99987786599629e+15\\
0.289738982915878 9.99964486402048e+15\\
0.299635320901871 9.99902316750438e+15\\
0.309635758399963 9.99744154579763e+15\\
0.31975319981575 9.99362331987149e+15\\
0.329985767602921 9.98490990496973e+15\\
0.340321004390717 9.96619565871923e+15\\
0.350743025541306 9.92851805811507e+15\\
0.361233711242676 9.85768116250214e+15\\
0.37177500128746 9.73369404660122e+15\\
0.382352620363235 9.53205929069773e+15\\
0.39295557141304 9.22771576061952e+15\\
0.403575569391251 8.80134308285645e+15\\
0.414206713438034 8.24619708501197e+15\\
0.424845099449158 7.57260823717478e+15\\
0.435488194227219 6.8078812570583e+15\\
0.446134299039841 5.99126516642611e+15\\
0.456782281398773 5.16601189656166e+15\\
0.467431485652924 4.37150415008563e+15\\
0.478081494569778 3.63787890720768e+15\\
0.488731980323792 2.98394892999066e+15\\
0.499382793903351 2.41788861494067e+15\\
0.510033845901489 1.9395075071017e+15\\
0.520685017108917 1.54299572368179e+15\\
0.53133624792099 1.21941302181888e+15\\
0.541987597942352 958588449193984\\
0.552639007568359 750391184588800\\
0.563290417194366 585471151308800\\
0.573941826820374 455613251321856\\
0.584593296051025 353840142483456\\
0.595244705677032 274367409815552\\
0.605896174907684 212483608412160\\
0.616547703742981 164401315315712\\
0.627199172973633 127105723531264\\
0.637850642204285 98214887817216\\
0.648502111434937 75857410392064\\
0.659153640270233 58569395273728\\
0.669805109500885 45209442320384\\
0.680456578731537 34889864839168\\
0.691108107566834 26921624666112\\
0.701759576797485 20770675752960\\
0.712411046028137 16023571922944\\
0.723062574863434 12360518467584\\
0.733714044094086 9534319886336\\
0.744365572929382 7354003226624\\
0.755017042160034 5672089944064\\
0.765668511390686 4374723035136\\
0.776320040225983 3374024228864\\
0.786971509456635 2602178183168\\
0.797622978687286 2006860300288\\
0.808274447917938 1547701321728\\
0.818925976753235 1193558802432\\
0.829577445983887 920408621056\\
0.840228915214539 709718900736\\
0.850880324840546 547193978880\\
0.861531794071198 421805326336\\
0.872183203697205 325043945472\\
0.882834613323212 250343145472\\
0.893486022949219 192633274368\\
0.904137372970581 147997655040\\
0.914788603782654 113406894080\\
0.925439834594727 86513205248\\
0.936091184616089 65490825216\\
0.946742534637451 48913416192\\
0.957393944263458 35655868416\\
0.968045353889465 24818370560\\
0.978696763515472 15665357824\\
0.989348173141479 7575591424\\
0.999999582767487 0\\
};
\addlegendentry{RHO};



\begin{scope}[
   line width=1pt,
   myarrowlabel/.style={anchor=west,rotate=90,fill=white}
   ]
% vertical lines
\draw[dashed] (rel axis cs:\xA,0) -- (rel axis cs:\xA, 1);
\draw[densely dotted] (rel axis cs:\xB,0) -- (rel axis cs:\xB, 1);
\draw[dashed] (rel axis cs:\xC,0) -- (rel axis cs:\xC, 1);

% arrows with labels
\draw[<->, shorten >=2pt,shorten <=2pt]
   (rel axis cs:0,\rely)
   --node[myarrowlabel]  {Bahngebiet}
   (rel axis cs:\xA,\rely);

\draw[<-, rounded corners, shorten <=2pt]
   (rel axis cs:\xB,\rely) -- (rel axis cs:\xB+0.05,\rely) --
   (rel axis cs:\xB+0.05,\rely+0.05)
   node[myarrowlabel] {Sperrschicht};

\draw[<->, shorten >=2pt,shorten <=2pt]
   (rel axis cs:\xC,\rely)
   --node[myarrowlabel] {Bahngebiet}
   (rel axis cs:1,\rely);
\end{scope}

\end{axis}
\end{tikzpicture}





\begin{tikzpicture}

\begin{axis}[%
width=\figurewidth,
height=\figureheight,
scale only axis,
xmin=0,
xmax=1,
xlabel={$\nicefrac{x}{\mu m}$},
xmajorgrids,
ymin=-1,
ymax=1.5,
ylabel={$\nicefrac{E}{eV}$},
ymajorgrids,
title={Energieverlauf},
legend style={draw=black,fill=white,legend cell align=left},
xlabel style={font=\Large},
ylabel style={font=\Large}
]

\begin{scope}[
   line width=1pt,
   myarrowlabel/.style={anchor=west,rotate=90,fill=white}
   ]
% vertical lines
\draw[dashed] (rel axis cs:\xA,0) -- (rel axis cs:\xA, 1);
\draw[densely dotted] (rel axis cs:\xB,0) -- (rel axis cs:\xB, 1);
\draw[dashed] (rel axis cs:\xC,0) -- (rel axis cs:\xC, 1);

% arrows with labels
\draw[<->, shorten >=2pt,shorten <=2pt]
   (rel axis cs:0,\rely)
   --node[myarrowlabel]  {Bahngebiet}
   (rel axis cs:\xA,\rely);

\draw[<-, rounded corners, shorten <=2pt]
   (rel axis cs:\xB,\rely) -- (rel axis cs:\xB+0.05,\rely) --
   (rel axis cs:\xB+0.05,\rely+0.05)
   node[myarrowlabel] {Sperrschicht};

\draw[<->, shorten >=2pt,shorten <=2pt]
   (rel axis cs:\xC,\rely)
   --node[myarrowlabel] {Bahngebiet}
   (rel axis cs:1,\rely);
\end{scope}

\addplot [
color=black,
solid,
line width=1.0pt
]
table[row sep=crcr]{
0 1.02527225017548\\
0.0106515660881996 1.02527225017548\\
0.0213031321763992 1.02527225017548\\
0.0319546982645988 1.02527225017548\\
0.0426062494516373 1.02527225017548\\
0.0532571598887444 1.02527225017548\\
0.0638988167047501 1.02527225017548\\
0.0744716376066208 1.02527225017548\\
0.08476971834898 1.02527225017548\\
0.0945955812931061 1.02527213096619\\
0.103908754885197 1.0252673625946\\
0.112750686705112 1.02515125274658\\
0.121192403137684 1.02446639537811\\
0.12932114303112 1.0224050283432\\
0.137209430336952 1.01778090000153\\
0.144906640052795 1.00847125053406\\
0.152468040585518 0.991268873214722\\
0.159945711493492 0.968879461288452\\
0.167390301823616 0.934324324131012\\
0.174849763512611 0.899965584278107\\
0.18236967921257 0.866470634937286\\
0.189992070198059 0.833498477935791\\
0.197761610150337 0.800839722156525\\
0.205729201436043 0.768325686454773\\
0.213961631059647 0.735764384269714\\
0.222553476691246 0.702900111675262\\
0.231588155031204 0.669573605060577\\
0.241006135940552 0.636177182197571\\
0.250639855861664 0.603435039520264\\
0.260369092226028 0.57182514667511\\
0.270136207342148 0.541564643383026\\
0.279919803142548 0.512732326984406\\
0.289738982915878 0.485283523797989\\
0.299635320901871 0.459127813577652\\
0.309635758399963 0.434235483407974\\
0.31975319981575 0.410625576972961\\
0.329985767602921 0.38835620880127\\
0.340321004390717 0.367504715919495\\
0.350743025541306 0.348145455121994\\
0.361233711242676 0.330342978239059\\
0.37177500128746 0.314144760370255\\
0.382352620363235 0.299572139978409\\
0.39295557141304 0.286620020866394\\
0.403575569391251 0.275255382061005\\
0.414206713438034 0.265416502952576\\
0.424845099449158 0.25701379776001\\
0.435488194227219 0.249933779239655\\
0.446134299039841 0.244044944643974\\
0.456782281398773 0.239205554127693\\
0.467431485652924 0.235271647572517\\
0.478081494569778 0.232104271650314\\
0.488731980323792 0.229574933648109\\
0.499382793903351 0.227569058537483\\
0.510033845901489 0.22598734498024\\
0.520685017108917 0.22474592924118\\
0.53133624792099 0.223775237798691\\
0.541987597942352 0.223018497228622\\
0.552639007568359 0.222429946064949\\
0.563290417194366 0.221973076462746\\
0.573941826820374 0.221618920564651\\
0.584593296051025 0.221344709396362\\
0.595244705677032 0.221132606267929\\
0.605896174907684 0.220968618988991\\
0.616547703742981 0.220841929316521\\
0.627199172973633 0.220744088292122\\
0.637850642204285 0.22066855430603\\
0.648502111434937 0.220610246062279\\
0.659153640270233 0.220565259456635\\
0.669805109500885 0.220530539751053\\
0.680456578731537 0.220503747463226\\
0.691108107566834 0.22048307955265\\
0.701759576797485 0.220467150211334\\
0.712411046028137 0.220454856753349\\
0.723062574863434 0.220445364713669\\
0.733714044094086 0.220438048243523\\
0.744365572929382 0.220432415604591\\
0.755017042160034 0.220428064465523\\
0.765668511390686 0.220424711704254\\
0.776320040225983 0.220422118902206\\
0.786971509456635 0.220420122146606\\
0.797622978687286 0.220418587327003\\
0.808274447917938 0.220417395234108\\
0.818925976753235 0.220416486263275\\
0.829577445983887 0.220415771007538\\
0.840228915214539 0.220415234565735\\
0.850880324840546 0.22041480243206\\
0.861531794071198 0.220414489507675\\
0.872183203697205 0.220414236187935\\
0.882834613323212 0.220414042472839\\
0.893486022949219 0.220413893461227\\
0.904137372970581 0.220413774251938\\
0.914788603782654 0.220413684844971\\
0.925439834594727 0.220413610339165\\
0.936091184616089 0.220413565635681\\
0.946742534637451 0.220413520932198\\
0.957393944263458 0.220413491129875\\
0.968045353889465 0.220413461327553\\
0.978696763515472 0.22041343152523\\
0.989348173141479 0.220413416624069\\
0.999999582767487 0.220413386821747\\
};
\addlegendentry{VC};

\addplot [
color=black,
dashed,
line width=1.0pt
]
table[row sep=crcr]{
0 -0.0163469091057777\\
0.0106515660881996 -0.0163469091057777\\
0.0213031321763992 -0.0163469091057777\\
0.0319546982645988 -0.0163469091057777\\
0.0426062494516373 -0.0163469091057777\\
0.0532571598887444 -0.0163469091057777\\
0.0638988167047501 -0.0163469091057777\\
0.0744716376066208 -0.0163469091057777\\
0.08476971834898 -0.0163469109684229\\
0.0945955812931061 -0.0163470115512609\\
0.103908754885197 -0.0163533426821232\\
0.112750686705112 -0.0166386645287275\\
0.121192403137684 -0.0184557437896729\\
0.12932114303112 -0.0239878389984369\\
0.137209430336952 -0.0362111106514931\\
0.144906640052795 -0.0593498647212982\\
0.152468040585518 -0.0988647937774658\\
0.159945711493492 -0.149523168802261\\
0.167390301823616 -0.187111243605614\\
0.174849763512611 -0.221541419625282\\
0.18236967921257 -0.25503745675087\\
0.189992070198059 -0.288009613752365\\
0.197761610150337 -0.320668339729309\\
0.205729201436043 -0.353182405233383\\
0.213961631059647 -0.385743677616119\\
0.222553476691246 -0.418607980012894\\
0.231588155031204 -0.451934456825256\\
0.241006135940552 -0.485330909490585\\
0.250639855861664 -0.51807302236557\\
0.260369092226028 -0.549682915210724\\
0.270136207342148 -0.579943418502808\\
0.279919803142548 -0.608775794506073\\
0.289738982915878 -0.636224567890167\\
0.299635320901871 -0.662380278110504\\
0.309635758399963 -0.687272608280182\\
0.31975319981575 -0.710882484912872\\
0.329985767602921 -0.733151853084564\\
0.340321004390717 -0.754003345966339\\
0.350743025541306 -0.773362636566162\\
0.361233711242676 -0.791165113449097\\
0.37177500128746 -0.807363331317902\\
0.382352620363235 -0.821935951709747\\
0.39295557141304 -0.83488804101944\\
0.403575569391251 -0.846252679824829\\
0.414206713438034 -0.856091558933258\\
0.424845099449158 -0.864494264125824\\
0.435488194227219 -0.871574282646179\\
0.446134299039841 -0.877463161945343\\
0.456782281398773 -0.882302522659302\\
0.467431485652924 -0.886236429214478\\
0.478081494569778 -0.889403820037842\\
0.488731980323792 -0.891933143138886\\
0.499382793903351 -0.893939018249512\\
0.510033845901489 -0.895520746707916\\
0.520685017108917 -0.896762132644653\\
0.53133624792099 -0.897732853889465\\
0.541987597942352 -0.898489594459534\\
0.552639007568359 -0.899078130722046\\
0.563290417194366 -0.899535000324249\\
0.573941826820374 -0.899889171123505\\
0.584593296051025 -0.900163352489471\\
0.595244705677032 -0.900375485420227\\
0.605896174907684 -0.900539457798004\\
0.616547703742981 -0.900666117668152\\
0.627199172973633 -0.900763988494873\\
0.637850642204285 -0.900839507579803\\
0.648502111434937 -0.900897800922394\\
0.659153640270233 -0.900942802429199\\
0.669805109500885 -0.900977551937103\\
0.680456578731537 -0.901004314422607\\
0.691108107566834 -0.901024997234344\\
0.701759576797485 -0.9010409116745\\
0.712411046028137 -0.901053249835968\\
0.723062574863434 -0.901062726974487\\
0.733714044094086 -0.90106999874115\\
0.744365572929382 -0.901075661182404\\
0.755017042160034 -0.901080012321472\\
0.765668511390686 -0.90108335018158\\
0.776320040225983 -0.90108597278595\\
0.786971509456635 -0.901087939739227\\
0.797622978687286 -0.901089489459991\\
0.808274447917938 -0.901090681552887\\
0.818925976753235 -0.901091575622559\\
0.829577445983887 -0.901092290878296\\
0.840228915214539 -0.901092827320099\\
0.850880324840546 -0.901093244552612\\
0.861531794071198 -0.901093602180481\\
0.872183203697205 -0.90109384059906\\
0.882834613323212 -0.901094019412994\\
0.893486022949219 -0.901094198226929\\
0.904137372970581 -0.901094317436218\\
0.914788603782654 -0.901094377040863\\
0.925439834594727 -0.901094436645508\\
0.936091184616089 -0.901094496250153\\
0.946742534637451 -0.901094555854797\\
0.957393944263458 -0.901094615459442\\
0.968045353889465 -0.901094615459442\\
0.978696763515472 -0.901094615459442\\
0.989348173141479 -0.901094675064087\\
0.999999582767487 -0.901094675064087\\
};
\addlegendentry{VV};

\addplot [
color=black,
dotted,
line width=1.0pt
]
table[row sep=crcr]{
0 0.491706103086472\\
0.0106515660881996 0.491706103086472\\
0.0213031321763992 0.491706103086472\\
0.0319546982645988 0.491706103086472\\
0.0426062494516373 0.491706103086472\\
0.0532571598887444 0.491706103086472\\
0.0638988167047501 0.491706103086472\\
0.0744716376066208 0.491706103086472\\
0.08476971834898 0.491706103086472\\
0.0945955812931061 0.491705983877182\\
0.103908754885197 0.491700410842896\\
0.112750686705112 0.491499722003937\\
0.121192403137684 0.490248799324036\\
0.12932114303112 0.486452043056488\\
0.137209430336952 0.478028327226639\\
0.144906640052795 0.461804121732712\\
0.152468040585518 0.433445483446121\\
0.159945711493492 0.396921575069427\\
0.167390301823616 0.360849976539612\\
0.174849763512611 0.326455503702164\\
0.18236967921257 0.29296001791954\\
0.189992070198059 0.259987860918045\\
0.197761610150337 0.227329134941101\\
0.205729201436043 0.194815054535866\\
0.213961631059647 0.162253797054291\\
0.222553476691246 0.129389494657516\\
0.231588155031204 0.0960630029439926\\
0.241006135940552 0.0626665726304054\\
0.250639855861664 0.0299244560301304\\
0.260369092226028 -0.00168546545319259\\
0.270136207342148 -0.0319459363818169\\
0.279919803142548 -0.0607783012092113\\
0.289738982915878 -0.0882270634174347\\
0.299635320901871 -0.114382788538933\\
0.309635758399963 -0.139275103807449\\
0.31975319981575 -0.162885040044785\\
0.329985767602921 -0.185154393315315\\
0.340321004390717 -0.20600588619709\\
0.350743025541306 -0.225365146994591\\
0.361233711242676 -0.243167608976364\\
0.37177500128746 -0.259365856647491\\
0.382352620363235 -0.273938477039337\\
0.39295557141304 -0.286890596151352\\
0.403575569391251 -0.298255234956741\\
0.414206713438034 -0.30809411406517\\
0.424845099449158 -0.316496789455414\\
0.435488194227219 -0.323576807975769\\
0.446134299039841 -0.32946565747261\\
0.456782281398773 -0.334305047988892\\
0.467431485652924 -0.338238954544067\\
0.478081494569778 -0.341406345367432\\
0.488731980323792 -0.343935668468475\\
0.499382793903351 -0.345941543579102\\
0.510033845901489 -0.347523242235184\\
0.520685017108917 -0.348764657974243\\
0.53133624792099 -0.349735379219055\\
0.541987597942352 -0.350492119789124\\
0.552639007568359 -0.351080656051636\\
0.563290417194366 -0.351537525653839\\
0.573941826820374 -0.351891696453094\\
0.584593296051025 -0.352165877819061\\
0.595244705677032 -0.352378010749817\\
0.605896174907684 -0.352541983127594\\
0.616547703742981 -0.352668672800064\\
0.627199172973633 -0.352766513824463\\
0.637850642204285 -0.352842062711716\\
0.648502111434937 -0.352900356054306\\
0.659153640270233 -0.352945357561111\\
0.669805109500885 -0.352980077266693\\
0.680456578731537 -0.353006839752197\\
0.691108107566834 -0.353027522563934\\
0.701759576797485 -0.353043466806412\\
0.712411046028137 -0.353055745363235\\
0.723062574863434 -0.353065222501755\\
0.733714044094086 -0.353072553873062\\
0.744365572929382 -0.353078186511993\\
0.755017042160034 -0.353082537651062\\
0.765668511390686 -0.353085905313492\\
0.776320040225983 -0.35308849811554\\
0.786971509456635 -0.35309049487114\\
0.797622978687286 -0.353092014789581\\
0.808274447917938 -0.353093206882477\\
0.818925976753235 -0.353094130754471\\
0.829577445983887 -0.353094816207886\\
0.840228915214539 -0.353095382452011\\
0.850880324840546 -0.353095799684525\\
0.861531794071198 -0.353096127510071\\
0.872183203697205 -0.35309636592865\\
0.882834613323212 -0.353096574544907\\
0.893486022949219 -0.353096723556519\\
0.904137372970581 -0.353096812963486\\
0.914788603782654 -0.353096902370453\\
0.925439834594727 -0.35309699177742\\
0.936091184616089 -0.353097051382065\\
0.946742534637451 -0.353097081184387\\
0.957393944263458 -0.35309711098671\\
0.968045353889465 -0.353097140789032\\
0.978696763515472 -0.353097170591354\\
0.989348173141479 -0.353097200393677\\
0.999999582767487 -0.353097200393677\\
};
\addlegendentry{-V};

\addplot [
color=black,
dash pattern=on 1pt off 3pt on 3pt off 3pt,
line width=1.0pt
]
table[row sep=crcr]{
0 -0\\
0.0106515660881996 -0\\
0.0213031321763992 -0\\
0.0319546982645988 -0\\
0.0426062494516373 -0\\
0.0532571598887444 -0\\
0.0638988167047501 -0\\
0.0744716376066208 -0\\
0.08476971834898 -0\\
0.0945955812931061 -0\\
0.103908754885197 -0\\
0.112750686705112 -0\\
0.121192403137684 -0\\
0.12932114303112 -0\\
0.137209430336952 -0\\
0.144906640052795 -0\\
0.152468040585518 -0\\
0.159945711493492 -0\\
0.167390301823616 -0\\
0.174849763512611 -0\\
0.18236967921257 -0\\
0.189992070198059 -0\\
0.197761610150337 -0\\
0.205729201436043 -0\\
0.213961631059647 -0\\
0.222553476691246 -0\\
0.231588155031204 -0\\
0.241006135940552 -0\\
0.250639855861664 -0\\
0.260369092226028 -0\\
0.270136207342148 -0\\
0.279919803142548 -0\\
0.289738982915878 -0\\
0.299635320901871 -0\\
0.309635758399963 -0\\
0.31975319981575 -0\\
0.329985767602921 -0\\
0.340321004390717 -0\\
0.350743025541306 -0\\
0.361233711242676 -0\\
0.37177500128746 -0\\
0.382352620363235 -0\\
0.39295557141304 -0\\
0.403575569391251 -0\\
0.414206713438034 -0\\
0.424845099449158 -0\\
0.435488194227219 -0\\
0.446134299039841 -0\\
0.456782281398773 -0\\
0.467431485652924 -0\\
0.478081494569778 -0\\
0.488731980323792 -0\\
0.499382793903351 -0\\
0.510033845901489 -0\\
0.520685017108917 -0\\
0.53133624792099 -0\\
0.541987597942352 -0\\
0.552639007568359 -0\\
0.563290417194366 -0\\
0.573941826820374 -0\\
0.584593296051025 -0\\
0.595244705677032 -0\\
0.605896174907684 -0\\
0.616547703742981 -0\\
0.627199172973633 -0\\
0.637850642204285 -0\\
0.648502111434937 -0\\
0.659153640270233 -0\\
0.669805109500885 -0\\
0.680456578731537 -0\\
0.691108107566834 -0\\
0.701759576797485 -0\\
0.712411046028137 -0\\
0.723062574863434 -0\\
0.733714044094086 -0\\
0.744365572929382 -0\\
0.755017042160034 -0\\
0.765668511390686 -0\\
0.776320040225983 -0\\
0.786971509456635 -0\\
0.797622978687286 -0\\
0.808274447917938 -0\\
0.818925976753235 -0\\
0.829577445983887 -0\\
0.840228915214539 -0\\
0.850880324840546 -0\\
0.861531794071198 -0\\
0.872183203697205 -0\\
0.882834613323212 -0\\
0.893486022949219 -0\\
0.904137372970581 -0\\
0.914788603782654 -0\\
0.925439834594727 -0\\
0.936091184616089 -0\\
0.946742534637451 -0\\
0.957393944263458 -0\\
0.968045353889465 -0\\
0.978696763515472 -0\\
0.989348173141479 -0\\
0.999999582767487 -0\\
};
\addlegendentry{-VN};

\addplot [
color=black,
solid,
line width=1.0pt,
mark=+,
mark options={solid}
]
table[row sep=crcr]{
0 -0\\
0.0106515660881996 -0\\
0.0213031321763992 -0\\
0.0319546982645988 -0\\
0.0426062494516373 -0\\
0.0532571598887444 -0\\
0.0638988167047501 -0\\
0.0744716376066208 -0\\
0.08476971834898 -0\\
0.0945955812931061 -0\\
0.103908754885197 -0\\
0.112750686705112 -0\\
0.121192403137684 -0\\
0.12932114303112 -0\\
0.137209430336952 -0\\
0.144906640052795 -0\\
0.152468040585518 -0\\
0.159945711493492 -0\\
0.167390301823616 -0\\
0.174849763512611 -0\\
0.18236967921257 -0\\
0.189992070198059 -0\\
0.197761610150337 -0\\
0.205729201436043 -0\\
0.213961631059647 -0\\
0.222553476691246 -0\\
0.231588155031204 -0\\
0.241006135940552 -0\\
0.250639855861664 -0\\
0.260369092226028 -0\\
0.270136207342148 -0\\
0.279919803142548 -0\\
0.289738982915878 -0\\
0.299635320901871 -0\\
0.309635758399963 -0\\
0.31975319981575 -0\\
0.329985767602921 -0\\
0.340321004390717 -0\\
0.350743025541306 -0\\
0.361233711242676 -0\\
0.37177500128746 -0\\
0.382352620363235 -0\\
0.39295557141304 -0\\
0.403575569391251 -0\\
0.414206713438034 -0\\
0.424845099449158 -0\\
0.435488194227219 -0\\
0.446134299039841 -0\\
0.456782281398773 -0\\
0.467431485652924 -0\\
0.478081494569778 -0\\
0.488731980323792 -0\\
0.499382793903351 -0\\
0.510033845901489 -0\\
0.520685017108917 -0\\
0.53133624792099 -0\\
0.541987597942352 -0\\
0.552639007568359 -0\\
0.563290417194366 -0\\
0.573941826820374 -0\\
0.584593296051025 -0\\
0.595244705677032 -0\\
0.605896174907684 -0\\
0.616547703742981 -0\\
0.627199172973633 -0\\
0.637850642204285 -0\\
0.648502111434937 -0\\
0.659153640270233 -0\\
0.669805109500885 -0\\
0.680456578731537 -0\\
0.691108107566834 -0\\
0.701759576797485 -0\\
0.712411046028137 -0\\
0.723062574863434 -0\\
0.733714044094086 -0\\
0.744365572929382 -0\\
0.755017042160034 -0\\
0.765668511390686 -0\\
0.776320040225983 -0\\
0.786971509456635 -0\\
0.797622978687286 -0\\
0.808274447917938 -0\\
0.818925976753235 -0\\
0.829577445983887 -0\\
0.840228915214539 -0\\
0.850880324840546 -0\\
0.861531794071198 -0\\
0.872183203697205 -0\\
0.882834613323212 -0\\
0.893486022949219 -0\\
0.904137372970581 -0\\
0.914788603782654 -0\\
0.925439834594727 -0\\
0.936091184616089 -0\\
0.946742534637451 -0\\
0.957393944263458 -0\\
0.968045353889465 -0\\
0.978696763515472 -0\\
0.989348173141479 -0\\
0.999999582767487 -0\\
};
\addlegendentry{-VP};



\end{axis}

\end{tikzpicture}%
\end{document}

enter image description here

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.