I have plenty of plots, about 200. using for loop, function, shell
command. when I use terminal pdf, all is ok. but I need add some equation on axis. so I have to use terminal latex or something. after I changed terminal to epslatex(shown below). $ gnuplot **.gplt works fine. gives a tex file and eps file. And eps file have several plots without any text. after I $ pdflatex **.tex. It only gives a pdf with the first plot and all axis text overlap. I've trid $ set mutliplot it gives eps and pdf all plots overlapped in one plot. so do any text. I've searched several days for solution. can't find any demo or question as complex as I have(loop, function, shell command). also find none problem like I described above(eps mutliplot while pdf only one). ----------------------------------------------------------------------- main part of my gnuplot script: set terminal epslatex size 45cm, 30cm color colortext standalone set output "result_MVyes_inVno_aver_vg_percent_n-p.tex" array distance[8] = ["0.1", "0.5", "1.0", "1.5", "2.0", "3.0", "5.0", "7.0"] array start[8] = [24, 719, 1414, 2109, 2804, 3499, 4194, 4889] array end[8] = [368, 1063, 1758, 2453, 3148, 3843, 4538, 5233] getData(fName, n) = sprintf("<(sed -n '%d,%dp' %s)", start[n], end[n], fName) array clean[3] = ["po", "no", "BGno"] fileName(year, i) = sprintf("origin_fluid_%s%s.dat", year, clean[i]) comData(n, year) = sprintf("<(paste %s %s |sed -n '%d,%dp')", fileName(year, 1), fileName(year, 2), start[n], end[n]) uds0 = "using 2:(100*($12-$28)/$28)" set xlabel 'y' set key out vert set logscale x 10 set format y '$%.1e$' set xrange [10**(-2):3.5] #################################### # atmospheric pressure # # # #################################### set yrange [-2*10**(-4):2*10**(-4)] ##################################### set ylabel 'atmospheric pressure' set title 'every year every distance polluted atmospheric pressure' plot for [year in "2004 2005 2006"] for [i = 1:8] comData(i, year) @uds0 with linespoint pn 5 lt (abs(year)-2004)*8+i title year." ".distance[i] ####################################年份不变 set title '2004 every distance polluted and nonpolluted atmospheric pressure' plot for [year in "2004"] for [i = 1:8] comData(i, year) @uds0 with linespoint pn 5 lt (abs(year)-2004)*8+i title year." ".distance[i] set title '2005 every distance polluted and nonpolluted atmospheric pressure' plot for [year in "2005"] for [i = 1:8] comData(i, year) @uds0 with linespoint pn 5 lt (abs(year)-2004)*8+i title year." ".distance[i] set title '2006 every distance polluted and nonpolluted atmospheric pressure' plot for [year in "2006"] for [i = 1:8] comData(i, year) @uds0 with linespoint pn 5 lt (abs(year)-2004)*8+i title year." ".distance[i] #################################### do for [i = 1:8] { set title "every year ".distance[i]." polluted and nonpolluted atmospheric pressure" plot for [year in "2004 2005 2006"] comData(i, year) @uds0 with linespoint pn 5 lt (abs(year)-2003) title year." ".distance[i] } -- Tu Can <[hidden email]> |
Am 06. Oktober 2020 um 13:15 Uhr schrieb "Tu Can":
> I have plenty of plots, about 200. using for loop, function, shell > command. > > when I use terminal pdf, all is ok. but I need add some equation on > axis. so I have to use terminal latex or something. > > after I changed terminal to epslatex(shown below). > $ gnuplot **.gplt > works fine. gives a tex file and eps file. And eps file have several > plots without any text. after I > $ pdflatex **.tex. > It only gives a pdf with the first plot and all axis text overlap. > > I've trid > $ set mutliplot > it gives eps and pdf all plots overlapped in one plot. so do any text. > > I've searched several days for solution. can't find any demo or > question as complex as I have(loop, function, shell command). also find > none problem like I described above(eps mutliplot while pdf only one). > > ----------------------------------------------------------------------- > main part of my gnuplot script: > > set terminal epslatex size 45cm, 30cm color colortext standalone > set output "result_MVyes_inVno_aver_vg_percent_n-p.tex" > > array distance[8] = ["0.1", "0.5", "1.0", "1.5", "2.0", "3.0", "5.0", > "7.0"] > array start[8] = [24, 719, 1414, 2109, 2804, 3499, 4194, 4889] > array end[8] = [368, 1063, 1758, 2453, 3148, 3843, 4538, 5233] > getData(fName, n) = sprintf("<(sed -n '%d,%dp' %s)", start[n], end[n], > fName) > > array clean[3] = ["po", "no", "BGno"] > fileName(year, i) = sprintf("origin_fluid_%s%s.dat", year, clean[i]) > comData(n, year) = sprintf("<(paste %s %s |sed -n '%d,%dp')", > fileName(year, 1), fileName(year, 2), start[n], end[n]) > > uds0 = "using 2:(100*($12-$28)/$28)" > > set xlabel 'y' > set key out vert > set logscale x 10 > set format y '$%.1e$' > set xrange [10**(-2):3.5] > > #################################### > # atmospheric pressure # > # # > #################################### > > set yrange [-2*10**(-4):2*10**(-4)] > ##################################### > set ylabel 'atmospheric pressure' > set title 'every year every distance polluted atmospheric pressure' > plot for [year in "2004 2005 2006"] for [i = 1:8] comData(i, year) > @uds0 with linespoint pn 5 lt (abs(year)-2004)*8+i title year." > ".distance[i] > > ####################################年份不变 > set title '2004 every distance polluted and nonpolluted atmospheric > pressure' > plot for [year in "2004"] for [i = 1:8] comData(i, year) @uds0 with > linespoint pn 5 lt (abs(year)-2004)*8+i title year." ".distance[i] > > set title '2005 every distance polluted and nonpolluted atmospheric > pressure' > plot for [year in "2005"] for [i = 1:8] comData(i, year) @uds0 with > linespoint pn 5 lt (abs(year)-2004)*8+i title year." ".distance[i] > > set title '2006 every distance polluted and nonpolluted atmospheric > pressure' > plot for [year in "2006"] for [i = 1:8] comData(i, year) @uds0 with > linespoint pn 5 lt (abs(year)-2004)*8+i title year." ".distance[i] > > #################################### > do for [i = 1:8] { > set title "every year ".distance[i]." polluted and nonpolluted > atmospheric pressure" > plot for [year in "2004 2005 2006"] comData(i, year) @uds0 with > linespoint pn 5 lt (abs(year)-2003) title year." ".distance[i] > } > > > -- > Tu Can <[hidden email]> > This looks like a question that would better be directed at a gnuplot or latex mailing list. This is a list for help with GNU Octave. I see that you asked the same question on the gnuplot mailing list already a few days ago: https://sourceforge.net/p/gnuplot/mailman/message/37120349/ Maybe someone will be able to help you there. Markus |
On Tue, 2020-10-06 at 13:55 +0200, Markus Mützel wrote:
> Am 06. Oktober 2020 um 13:15 Uhr schrieb "Tu Can": > > I have plenty of plots, about 200. using for loop, function, shell > > command. > > > > when I use terminal pdf, all is ok. but I need add some equation on > > axis. so I have to use terminal latex or something. > > > > after I changed terminal to epslatex(shown below). > > $ gnuplot **.gplt > > works fine. gives a tex file and eps file. And eps file have several > > plots without any text. after I > > $ pdflatex **.tex. > > It only gives a pdf with the first plot and all axis text overlap. > > > > I've trid > > $ set mutliplot > > it gives eps and pdf all plots overlapped in one plot. so do any text. > > > > I've searched several days for solution. can't find any demo or > > question as complex as I have(loop, function, shell command). also find > > none problem like I described above(eps mutliplot while pdf only one). > > > > ----------------------------------------------------------------------- > > main part of my gnuplot script: > > > > set terminal epslatex size 45cm, 30cm color colortext standalone > > set output "result_MVyes_inVno_aver_vg_percent_n-p.tex" > > > > array distance[8] = ["0.1", "0.5", "1.0", "1.5", "2.0", "3.0", "5.0", > > "7.0"] > > array start[8] = [24, 719, 1414, 2109, 2804, 3499, 4194, 4889] > > array end[8] = [368, 1063, 1758, 2453, 3148, 3843, 4538, 5233] > > getData(fName, n) = sprintf("<(sed -n '%d,%dp' %s)", start[n], end[n], > > fName) > > > > array clean[3] = ["po", "no", "BGno"] > > fileName(year, i) = sprintf("origin_fluid_%s%s.dat", year, clean[i]) > > comData(n, year) = sprintf("<(paste %s %s |sed -n '%d,%dp')", > > fileName(year, 1), fileName(year, 2), start[n], end[n]) > > > > uds0 = "using 2:(100*($12-$28)/$28)" > > > > set xlabel 'y' > > set key out vert > > set logscale x 10 > > set format y '$%.1e$' > > set xrange [10**(-2):3.5] > > > > #################################### > > # atmospheric pressure # > > # # > > #################################### > > > > set yrange [-2*10**(-4):2*10**(-4)] > > ##################################### > > set ylabel 'atmospheric pressure' > > set title 'every year every distance polluted atmospheric pressure' > > plot for [year in "2004 2005 2006"] for [i = 1:8] comData(i, year) > > @uds0 with linespoint pn 5 lt (abs(year)-2004)*8+i title year." > > ".distance[i] > > > > ####################################年份不变 > > set title '2004 every distance polluted and nonpolluted atmospheric > > pressure' > > plot for [year in "2004"] for [i = 1:8] comData(i, year) @uds0 with > > linespoint pn 5 lt (abs(year)-2004)*8+i title year." ".distance[i] > > > > set title '2005 every distance polluted and nonpolluted atmospheric > > pressure' > > plot for [year in "2005"] for [i = 1:8] comData(i, year) @uds0 with > > linespoint pn 5 lt (abs(year)-2004)*8+i title year." ".distance[i] > > > > set title '2006 every distance polluted and nonpolluted atmospheric > > pressure' > > plot for [year in "2006"] for [i = 1:8] comData(i, year) @uds0 with > > linespoint pn 5 lt (abs(year)-2004)*8+i title year." ".distance[i] > > > > #################################### > > do for [i = 1:8] { > > set title "every year ".distance[i]." polluted and nonpolluted > > atmospheric pressure" > > plot for [year in "2004 2005 2006"] comData(i, year) @uds0 with > > linespoint pn 5 lt (abs(year)-2003) title year." ".distance[i] > > } > > > > > > -- > > Tu Can <[hidden email]> > > > > This looks like a question that would better be directed at a gnuplot or latex mailing list. This is a list for help with GNU Octave. > > I see that you asked the same question on the gnuplot mailing list already a few days ago: > https://sourceforge.net/p/gnuplot/mailman/message/37120349/ > > Maybe someone will be able to help you there. > > Markus > sorry and many thanks. It's not my intent, ask A question in B mailing list. just mixed up after worked all day. Mistaking octave for gnuplot when I saw a new mail from this mailing list (I once tried use octave to plot). -- Tu Can <[hidden email]> |
Free forum by Nabble | Edit this page |