Plotting with batch mode

Asked by Samuel Hatch

Hi authors,

I'm quite new to CalcHEP and currently trying to learn the basics. I've tried testing the outputs generated from the example batch files provided, however, I am encountering a problem with the distributions. When running the batch file, this is outputted in the terminal:

set term jpeg transparent medium
^
"gnuplot_instructions" line 1: unknown or ambiguous terminal type: type just 'set terminal' for a list

cp: cannot stat 'distr_1.jpg': no such file or directory.

This occurs on all the example batch files, as well as some I have made myself. I have installed gnuplot and it appears that CalcHEP is finding results, just the program cannot actually create the distribution graphs and I'm hoping you can shed some light as to where to go from here. Apologies if this is a simple fix.

Question information

Language:
English Edit question
Status:
Solved
For:
CalcHEP Edit question
Assignee:
No assignee Edit question
Solved by:
Alexander Belyaev
Solved:
Last query:
Last reply:
Revision history for this message
Alexander Belyaev (alexander.belyaev) said :
#1

Dear Sam,

to help you we need to know:

1) which version of gnuplot do you have?
-- just type gnuplot and see the version

2) which exactly batch file did you run?

3) which operating system do you use?
uname -a

4)
type
"gnuplot"
then press
"enter"
to go to gnuplot shell
gnuplot>
and type
set terminal

Please let me know the output of this command

Thanks
Sasha

Revision history for this message
Samuel Hatch (hatchinator98) said :
#2

Dear Sasha

1)The version of gnuplot I'm using is 5.4.

2)I found this error came from all of the example batch files in the utile folder of CalcHEP. I've put "batch_file_3" specifically at the bottom of this message.

3)The operating system is Ubuntu: 5.4.0-53-generic #59-Ubuntu SMP

4)The following is outputted when I use the command "set terminal" in the gnuplot shell:

Available terminal types:
           canvas HTML Canvas object
              cgm Computer Graphics Metafile
          context ConTeXt with MetaFun (for PDF documents)
          domterm DomTerm terminal emulator with embedded SVG
             dumb ascii art for anything that prints text
              dxf dxf-file for AutoCad (default size 120x80)
              emf Enhanced Metafile format
         epslatex LaTeX picture environment using graphicx package
              fig FIG graphics language V3.2 for XFIG graphics editor
             hpgl HP7475 and relatives [number of pens] [eject]
               mf Metafont plotting standard
               mp MetaPost plotting standard
             pcl5 PCL5e/PCL5c printers using HP-GL/2
           pict2e LaTeX2e picture environment
       postscript PostScript graphics, including EPSF embedded files (*.eps)
          pslatex LaTeX picture environment with PostScript \specials
            pstex plain TeX with PostScript \specials
         pstricks LaTeX picture environment with PSTricks macros
              svg W3C Scalable Vector Graphics
          tek40xx Tektronix 4010 and others; most TEK emulators
          tek410x Tektronix 4106, 4107, 4109 and 420X terminals
Press return for more:
          texdraw LaTeX texdraw environment
         tkcanvas Tk canvas widget
          unknown Unknown terminal type - not a plotting device
            vttek VT-like tek40xx terminal emulator
              x11 X11 Window System interactive terminal
             xlib X11 Window System (dump of gnuplot_x11 command stream)
            xterm Xterm Tektronix 4014 Mode

Here is the batch_file_3:
Model: SM(+hgg)
Model changed: False
Gauge: Feynman

Process: p,p->W,b,B
Decay: W->le,n
Composite: p=u,U,d,D,s,S,c,C,b,B,G
Composite: W=W+,W-
Composite: le=e,E,m,M
Composite: n=ne,Ne,nm,Nm
Composite: jet=u,U,d,D,s,S,c,C,b,B,G

pdf1: PDT:cteq6l1(proton)
pdf2: PDT:cteq6l1(proton)

p1: 4000
p2: 4000

Run parameter: Mh
Run begin: 120
Run step size: 5
Run n steps: 3

alpha Q : M45

Cut parameter: M(b,B)
Cut invert: False
Cut min: 100
Cut max:

Cut parameter: J(jet,jet)
Cut invert: False
Cut min: 0.5
Cut max:

Cut parameter: T(jet)
Cut invert: False
Cut min: 20
Cut max:

Kinematics : 12 -> 3, 45
Kinematics : 45 -> 4 , 5

Regularization momentum: 45
Regularization mass: Mh
Regularization width: wh
Regularization power: 2

Dist parameter: M(b,B)
Dist min: 100
Dist max: 200
Dist n bins: 100
Dist title: p,p->W,b,B
Dist x-title: M(b,B) (GeV)

Dist parameter: M(W,jet)
Dist min: 100
Dist max: 200
Dist n bins: 100
Dist title: p,p->W,b,B
Dist x-title: M(W,jet) (GeV)

Number of events (per run step): 10000
Filename: pp_Wbb_enbb

nSess_1: 5
nCalls_1: 100000
nSess_2: 5
nCalls_2: 100000

Many thanks
Sam

Revision history for this message
Best Alexander Belyaev (alexander.belyaev) said :
#3

Dear Sam,

since you do not have "jpeg" in the list of terminal, you need
to install

"libgd"

library

accroding to
http://www.bersch.net/gnuplot-doc/complete-list-of-terminals.html
documentation

and then you need to Reinstall gnuplot

Please let me know if this helps
Regards,
Sasha

Revision history for this message
Samuel Hatch (hatchinator98) said :
#4

Dear Sasha

I managed to get gnuplot to compile with libgd and the plotting now works!

Thank you so much for helping to get this sorted.

Many thanks

Sam

Revision history for this message
Samuel Hatch (hatchinator98) said :
#5

Thanks Alexander Belyaev, that solved my question.

Revision history for this message
Alexander Belyaev (alexander.belyaev) said :
#6

Dear Sam,

thanks for the confirmation,

I am glad this problem is solved. We did not see this problem before, so
it is important it is documented at launchpad!

Regards,

Sasha

On 14/11/2020 16:30, Samuel Hatch wrote:
> Question #693859 on CalcHEP changed:
> https://answers.launchpad.net/calchep/+question/693859
>
> Status: Answered => Solved
>
> Samuel Hatch confirmed that the question is solved:
> Dear Sasha
>
> I managed to get gnuplot to compile with libgd and the plotting now
> works!
>
> Thank you so much for helping to get this sorted.
>
> Many thanks
>
> Sam
>
--
______________________________________________________________________
Prof. Alexander S Belyaev (<email address hidden>)
https://www.hep.phys.soton.ac.uk/content/alexander-belyaev

School of Physics & Astronomy, University of Southampton
Office 5047, SO17 1BJ, TEL: +44 23805 98509, FAX: +44 23805 93910
.....................................................................
Particle Physics Department, Rutherford Appleton Laboratory
Didcot, OX11 0QX, TEL: +44 12354 45562, FAX: +44 12354 46733
.....................................................................
CERN, CH-1211 Geneva 23, Switzerland
Office 40/1-B20, Mailbox: E27910, TEL: +41 2276 71642
______________________________________________________________________