0

How to 1) have one legent 2) make the first graph higher 3) plot secont data in first graph 4) have one x-axes - lower graph 5) minimalize space between graphs 6) have the same width of graphs

Thank you

set multiplot layout 2,1
set tmargin 1.8
set bmargin 1.8
set encoding iso_8859_1


unset xlabel
set ylabel "{/:Italic F} [a. u.]" font "Segoe UI,12"
set ytics nomirror font "Segoe UI,12"
set xtics nomirror font "Segoe UI,12"
#set decimalsign ','
set format y "%.2f"
set key at graph 0.78,1 font "Segoe UI,12"
set key out horiz font "Segoe UI,12"
set key tc variable
plot [4272:4500] [0.7:1.02] 'data1.txt' using 1:2 title "F" with lines linecolor rgb "red" lw 1.5, "data2.txt' using 1:3 title "D" with lines linecolor rgb "black" lw 1.5


set xlabel "{/:Italic {/Symbol l}} ({\305})" font "Segoe UI,12"
set ylabel "{/:Italic F} [a. u.]" font "Segoe UI,12"
set ytics nomirror font "Segoe UI,12"
set xtics nomirror font "Segoe UI,12"
#set decimalsign ','
set format y "%.2f"
set key at graph 0.78,1 font "Segoe UI,12"
set key out horiz font "Segoe UI,12"
set key tc variable
plot [4272:4500] 'data1.txt' using 1:4 title "DD - fitted" with lines linecolor rgb "navy" lw 1.5 

error:

plot 'data1.txt' using 1:2 title "Fid" with lines linecolor rgb "red" lw 1.5,"data1.txt' using 1:3 title "Measured" with lines linecolor rgb "bla
ck" lw 1.5"
                                                                                                                        ^
           unexpected or unrecognized token
1
  • 1
    Use "data1.txt" (double-quotes) or 'data1.txt' (single-quotes). Commented Aug 30, 2019 at 21:27

1 Answer 1

1

Something like this?

reset
set encoding utf8

set tics out nomirror

set style line 1 lc "red"
set style line 2 lc "orange"
set style line 3 lc "blue"

unset xtics
set  ytics
set  ylabel "y-axes"  #tc ls 1

set lmargin screen 0.10
set rmargin screen 0.95


set multiplot layout 2,1

set bmargin screen 0.40
set key Left reverse out horiz

set xrange [0:10]
set yrange [0:10] 

plot \
    x w l ls 1 t "x",\
    x + 5 w l ls 2 t "x + 5",\
    1/0 w l ls 3 t "1/0"

set tmargin screen 0.37
set bmargin screen 0.15

#set key left Left reverse
unset key

set tics out nomirror
set  xlabel "x-axes (λαβϵλ = label)"

plot x w l ls 3 t "x"

Result graph

Sign up to request clarification or add additional context in comments.

7 Comments

Thank you very much and please do you know what is wrong with lines that gives error?
Is it possible to set different yranges and place y-tics of the second graph on the right side?
Yes, it is. Use set yrange before each plot command or plot [<xmin>:<xmax>][<ymin>:<ymax>].
To tic-marks use unset ytics, set y2tics, and set link y2. If necessary, change rmargin and unset ylabel.
If this answer solved your question, don't forget of the mark as answered.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.