-2

In the visual, 2 different graphics are given in a single frame (layout 1, 2). Both graphs are constrained by y 0: 7.

  1. Data concerning the graph of the column (phonon distribution) "" ZrSbTe.ph_THz "and xmax = 0.885990 The data concerning the 2nd column graph are “ZrSbTe.dos_THz” and 2: 1 (Total), 3: 1 (Zr), 4: 1 (Sb) and 5: 1 (Te) ie the y-axis in the 1st column graph in the file, other columns in the file are taken as the x-axis in the graph. 70% area was used for 1st Chart and 30% for 2nd Chart. Let's get the same graph by paying attention to the colors. Let's load the gnuscript and the output graphic by making a 2 page PDF.

x-coordinates of column labels (you specify y coordinates)

Γ = -0.01
X = 0.13
L = 0.20
T = 0.22
W = 0.251
R = 0.34
X1 = 0.38
Z = 0.50
Γ = 0.575
Y = 0.67
S = 0.715
W = 0.835

enter image description here

Thor
  • 45,082
  • 11
  • 119
  • 130
  • 2
    Welcome to StackOverflow! Do you have some gnuplot code? What is actually your question? It's not clear to me. Are you asking about creating a multipage PDF? Please edit your question and clarify. – theozh Jun 02 '21 at 06:02
  • I need to plot 2 data as in the format (2 layout in one graph) in the figure like: First one is phonon distribution and its data is taken from a file which is named as "ZrSbTe.ph_THz" and its xmax need to shown here which xmax=0.885990 I need to show also x coordinates just like this; Γ=-0.01 X=0.13 L=0.20 T=0.22 W=0.251 R=0.34 X1=0.38 Z=0.50 Γ =0.575 Y=0.67 S=0.715 W=0.835 For the second graph: We need to convert axis like ; X to Y , Y to X like the figure. The data will be taken from "ZrSbTe.dos_THz" and its data columns are : – Fatih Yavuzhan Jun 02 '21 at 14:02
  • Γ=-0.01 X=0.13 L=0.20 T=0.22 W=0.251 R=0.34 X1=0.38 Z=0.50 Γ =0.575 Y=0.67 S=0.715 W=0.835 For the second graph: We need to convert axis like ; X to Y , Y to X like the figure. The data will be taken from "ZrSbTe.dos_THz" and its data columns are : 2:1 (Total), 3:1(Zr), 4:1 (Sb) ve 5:1 (Te) For the layout, First graph should take place 70% of the figure, Second graph should take placement 30%. Both graph's y axis is constrained with 0.7. I can Upload the data files wich are "ZrSbTe.ph_TH" and "ZrSbTe.dos_TH" . Any Help ? Tanks – Fatih Yavuzhan Jun 02 '21 at 14:03
  • 1
    What is your code? What have you tried so far? How far have you gotten? No code at all is a bit too little effort. StackOverflow is not a coding service, people here expect some own research effort and some minimal code (even/especially if it's not working or not giving the desired result). – theozh Jun 02 '21 at 14:22

1 Answers1

0

Your final goal could be split into many different questions and "how-to-dos",... too many without any code and specific question. Keep in mind, for every keyword you can type help <keyword> in the gnuplot console to get some information. Check the gnuplot homepage and the PDF manual in the local doc folder. I assume you are new to gnuplot... check the following example as a starting point. If you have a specific question, please remember: questions always with code.

Code:

### split graph
reset session

$Labels <<EOD
Γ   -0.01
X    0.13
L    0.20
T    0.22
W    0.251
R    0.34
X1   0.38
Z    0.50
Γ    0.575
Y    0.67
S    0.715
W    0.835
EOD

# create some random test data
N=100
set print $PH
    do for [i=0:N] {
        print sprintf("%g %g %g %g %g",-0.01+i*(0.835+0.01)/N, rand(0)*3, rand(0)*3+1, rand(0)*3+3, rand(0)*3+4)
    }
set print $DOS
    print "X Total Zr Sb Te"
    do for [i=0:N] {
        print sprintf("%g %g %g %g %g",-0.01+i*(0.835+0.01)/N, rand(0), rand(0)+1, rand(0)+2, rand(0)+3)
    }
set print

# set lines
do for [i=1:|$Labels|] {
    set arrow i from word($Labels[i],2),graph 0 to word($Labels[i],2), graph 1 nohead lw 1.5 front
}

set ylabel "Frequency / THz"
set key noautotitle opaque box
set colorsequence classic

set multiplot layout 1,2

    set size 0.7,1
    set bmargin 3
    set rmargin 0
    plot for [i=2:5] $PH u 1:i w l lc "dark-grey", \
         $Labels u 2:(NaN):xtic(1)

    set size 0.3,1
    set origin 0.7,0
    set lmargin 0
    set rmargin -1
    unset ylabel
    unset tics
    unset arrow
    set xlabel "DOS"
    plot for [i=2:5] $DOS u i:1 w l ti columnhead(i)
unset multiplot
### end of code

Result:

enter image description here

theozh
  • 22,244
  • 5
  • 28
  • 72
  • [yavuzhan@cluster ~]$ vi 05.gnu [yavuzhan@cluster ~]$ gnuplot 05.gnu reset session ^ "05.gnu", line 2: warning: expected optional axis name reset session ^ "05.gnu", line 2: ';' expected – Fatih Yavuzhan Jun 02 '21 at 16:45
  • @FatihYavuzhan What operating system and gnuplot version do you have? How do you start the script? – theozh Jun 02 '21 at 17:24