Changing units in X and Y axis while plotting in FLUKA

Dear experts,

Regarding the plotting in FLUKA, I have few queries.

For a DETECT card scoring, the default X asix is in GeV, but I want it to be in MeV.

The default command is

plot 'Si_1_17_tab.lis' ind 0 us 1:3 w steps lt 1 lw 2 lc rgb 'red't 'Detector 1', \
'' ind 0 us (($1+$2)/2.0):3:($3*($4/100.)) w errorbars lt 1 lw 2 lc rgb 'red' pt 0 ps 1 notitle

So to make the unit in MeV, I wrote in the box,

plot 'Si_1_17_tab.lis' ind 0 us ($1*1000):3 w steps lt 1 lw 2 lc rgb 'red't 'Detector 1', \
'' ind 0 us (($1*1000+$2*1000)/2.0):3:($3*($4/100.)) w errorbars lt 1 lw 2 lc rgb 'red' pt 0 ps 1 notitle

It seems working, but I faced the following issues:

  1. There are two legend lines
  2. After writing the above plot command, no other command is getting activated for e.g.

set lmargin screen 0.1
set rmargin screen 0.8
set ytics format “%1.2e”
set xtics format “%1.2e”
set xtics 5

Is there any other place where I can include the unit conversion of X and Y axis instead of the box?

Regards,
Riya

Dear @riya,

The command in the windows are executed in the order they are provided; therefore, first the plot is made, then the margins and ticks are changed, and last, finally the plot within flair is done (being superimposed on what is already present). Since your first command does a plot, nothing can change in margins and ticks. Since you are doing 2 plots, then 2 entries in the legend appear.

If you want to do the plot in MeV rather than GeV, you can select this option directly in the flair window from the pull down menu highlighted in the snapshot:

1 Like

3 posts were split to a new topic: Custom tics on plots