GNUplot for hysteresis loop not giving graph

14 views
Skip to first unread message

Buse Ozkan

unread,
Dec 16, 2020, 8:20:49 AM12/16/20
to
Hi All,

I am a PhD student in The University of Sheffield which involves doing micromagnetic simulations and drawing hysteresis loops which would take place via using NMAG package.

However, when I follow the instructions and tutorials in the manual makeplot.gnu is not working when I searched the error to draw it with my data - doing the simple hysteresis loop example the plot.dat - an empty plot is created.

where no loop is generated like there is no data in the file.
(I have changed the file name from plot.dat to plot1.dat)

I have tried the following:
gnuplot --persist -e 'plot "plot1.dat" u 1:2'

gnuplot make_plot.gnu
where the make_plot.gnu is a script with;
set term postscript eps enhanced color
set out ‘hysteresis.eps’
set xlabel ‘Applied field H_x (A/m)’
set ylabel ‘M_x / M_s’
set xrange [-1050000:1050000]
set yrange [-1.2:1.2]
plot ‘plot.dat’ u 1:2 ti ‘ellipsoid example’ w lp 3


Is there any help you can give me about this?
Also apart from the manuals are there any other tutorials present for me to understand the package more to use it effectively?

Waiting for your reply
Best wishes,
Buse OZKAN

Jörg Buchholz

unread,
Dec 17, 2020, 3:16:35 AM12/17/20
to
On 16.12.2020 14:20, Buse Ozkan wrote:
> I have tried the following: gnuplot --persist -e 'plot "plot1.dat" u
> 1:2'
>
> gnuplot make_plot.gnu where the make_plot.gnu is a script with; set
> term postscript eps enhanced color set out ‘hysteresis.eps’ set
> xlabel ‘Applied field H_x (A/m)’ set ylabel ‘M_x / M_s’ set xrange
> [-1050000:1050000] set yrange [-1.2:1.2] plot ‘plot.dat’ u 1:2 ti
> ‘ellipsoid example’ w lp 3
>
>
> Is there any help you can give me about this? Also apart from the
> manuals are there any other tutorials present for me to understand
> the package more to use it effectively?

If you first open gnuplot and then load the script you get error
messages from gnuplot.

load 'make_plot.gnu'


Jörg

Reply all
Reply to author
Forward
0 new messages