#!/usr/bin/octave
% Octave file: a figure for the file StabMiso.tex

gset output "kdvform-n-vs-c.tex"
% Clear labels and arrows:
gset nolabel
%gset noarrow

gset term pstex norotate
gset nokey
gset zeroaxis
gset nogrid
gset noborder
gset ticscale 1
gset noxtics
gset noytics
gset size 0.66,0.5
#gset linestyle 1 linewidth 3

#gset label '$\\sigma\\sb{ess}(e^{-\\mu x}J\\mathcal{H}\\sb{c}e^{\\mu x})$' at 0.4,0.6;
#gset label '$\\mu=\\frac 1{10}$' at -0.25,-0.55
#gset label '$\\mu=\\frac 1 4$' at -0.45,-0.55

gset label '$\\hskip -3pt\\star$' at 0.54500,  0.24413
gset label '$\\hskip -3pt\\star$' at 1.11500,  0.62609
gset label '$\\hskip -3pt\\star$' at 1.46800,  0.52676


gset label '$\\mathscr{N}\\sb{c}$' at -0.2,0.95
gset label '$c$' at 1.85,0.1
gset label '\\small\\it unstable' at 0.2,0.8
gset label '\\small\\it stable' at 0.65,0.55
gset label '\\small\\it unstable' at 1.15,0.7
gset label '\\small\\it stable' at 1.77,0.75


x=(0:0.1:2)';
xaxis=[x,0.*x];
yaxis=[0.*x,x];

function nn = N(c)
nn=0.1./c.+0.15.*(1.+cos(6.*c)).+0.2.*c.^2;
endfunction

c1=0.545;
c2=1.115;
c3=1.468;
PT1=[c1,N(c1)];
PT2=[c2,N(c2)];
PT3=[c3,N(c3)];

c=(0:0.01:c1)';
FIG1=[c,N(c)];

c=(c1:0.01:c2)';
FIG2=[c,N(c)];

c=(c2:0.01:c3)';
FIG3=[c,N(c)];

c=(c3:0.01:2)';
FIG4=[c,N(c)];

PTS=[0,0];


gplot [0:2] [0:1] \
    FIG1 with lines 3, \
    FIG2 with lines 1, \
    FIG3 with lines 3, \
    FIG4 with lines 1, \
    xaxis with lines 1, \
    yaxis with lines 1;
    


