Diagram preparation

advertisement
Introductory concepts:
Diagram preparation
Jon Goss
http://aimpro.ncl.ac.uk
MMG Skills Lecture Series
Outline
For the purposes of this session, the term
diagram refers to any pictorial or graphical
representation of data.
What is the purpose behind making a
diagram?
1.
2.
3.
4.
2
To show something to yourself
To communicate information to a colleague
To illustrate a report or paper
To include in a poster or talk
MMG Skills Lecture Series
Diagrams: for diagnosis
The classic types of diagram for diagnosis are
where we want to understand something about
a run. For example:
minimol
FORCES
ETOT
Homer
3
MMG Skills Lecture Series
Diagrams: for diagnosis
4
MMG Skills Lecture Series
Diagrams: for internal consumption
The second class of diagrams are
those used to show something to
a colleague
On paper
Electronically
For example, a bandstructure
plot, DoS, …
These are typically non-trivial to
construct (i.e. not via a single
command).
However, they are quick and dirty
in comparison to something that
we’d publish!
Nevertheless, the basic skills
required are very similar…
…familiarity with the software!
5
MMG Skills Lecture Series
Diagrams: for written reports
We’ll now look at five types of diagrams typical of
AIMPRO papers:
Basic atomistic structures (xbs)
Kohn-Sham functions and charge densities (AIMVIEW)
Hyperfine tensors (POV-Ray)
Band structures (gnuplot)
Formation energies (gnuplot)
Each of you should invest some time to learn how to use at least
AIMVIEW and gnuplot!
Before beginning, you check the following:
Keep all images in a report stylistically similar, so related structures
should be viewed from the same direction, and at the same distance.
For publications, there may be publisher-defined constraints (e.g. how
units are included in graph – in parentheses “(eV)”, or as a division
“/eV”).
6
MMG Skills Lecture Series
Diagrams: for written reports - xbs
“xbs” is a very simple structure
plotting package that has the
capacity for producing slightly
better images than, say, minimol.
(We’ll also look at much more lickable structures with AIMVIEW and
POV-Ray.)
xbs is available on snufkin.
It takes as input a relatively
simple format which describes the
atom species and how they bond,
plus a structure (of course).
This can be generated
automatically from an “xyz” file
using “x2bs” (~njpg/bin).
The GUI is invoked as “xbs file”…
7
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
atom
X
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
0.86294
0.86294
0.81914
2.75763934061345 2.75763934061345 2.75240668935108
-0.881961575033624 -0.881961575033624 2.51027987788644
-1.0145315223104 2.5906159091129 -0.99306990425811
2.5906159091129 -1.0145315223104 -0.99306990425811
3.63561359381117 3.63561359381117 0.101720170513226
4.53509481848491 4.53509481848491 2.17033706980097
7.58079831961937 7.58079831961937 0.873266945760172
9.23574664110324 9.23574664110324 2.4968004624099
9.13529069727637 5.83342350003411 -0.821401526277635
-0.848286657917147 2.50071030548027 5.81240407786314
7.6783648724097 4.20453261020676 4.32568105360856
9.26537565487816 5.86036910290525 5.9141034613905
5.83342350003411 9.13529069727637 -0.821401526277635
4.20453261020676 7.6783648724097 4.32568105360856
5.86036910290525 9.26537565487816 5.9141034613905
2.50071030548027 -0.848286657917147 5.81240407786314
5.77922804840765 2.31987864618118 -1.07273697248462
2.31987864618118 5.77922804840765 -1.07273697248462
6.20109425754999 6.20109425754999 2.88765815780565
4.20916999778273 0.792760839194733 4.20898102518387
5.88873955917179 2.48169777230918 5.89192752691452
0.792760839194733 4.20916999778273 4.20898102518387
2.48169777230918 5.88873955917179 5.89192752691452
spec
spec
spec
N
C
X
bonds
bonds
bonds
bonds
bonds
N
N
C
C
X
0.750
0.825
0.825
N
C
C
X
X
0.8
0
1
0.000
0.000
0.000
0.000
0.000
3.000
3.180
3.80
3.80
3.80
tmat -0.707 -0.707 0.000 0.000
dist
25.000
inc
5.000
scale
25.000
rfac 0.60
bfac 0.60
pos
10.000
0.000
pos
0.000
0.000
switches 1 0 1 0 0 1 1 2 1
0.300
0.300
0.300
0.100
0.300
0.000
0.5
0.5
0.5
1
0.5
1.000 -0.707
0.707
0.000
MMG Skills Lecture Series
Diagrams: for written reports - xbs
8
MMG Skills Lecture Series
Diagrams: for written reports - xbs
There are some advantages in using
this “primitive” software:
It produces simple images which may
be much more clear than the shiny
atoms we’ll see later
It produces smaller files
Why is this important?
The graphics are vector postscript and
therefore scalable
Why is this useful?
It is much faster to use (once you’ve
got used to it)
But there are also disadvantages:
Requires some linux expertise
You should be developing this anyway!
You may need to edit the postscript
output
Never a bad thing 
Can absorb lots of time “fiddling
about” if you’re not careful
This is a bad thing!
Goss et al Phys. Rev. B 76, 045203 (2007)
9
MMG Skills Lecture Series
Diagrams: for written reports - AIMVIEW
This is not the place to learn how to use
AIMVIEW – there is a whole manual
provided by Jerry.
Therefore, today I’ll assume that you’ll
be able to read the manual, and/or
collaborate with your peers to view your
structure from an AIMVIEW dump file.
However, we will look at some
important factors in generating the
image files.
First some guiding principles:
What makes a good or bad illustration
for a structure and wave function?
10
MMG Skills Lecture Series
Diagrams: for written reports - AIMVIEW
My answer (invert for bad)
Important part is central
There’s minimal additional material
(the surroundings)
There is a minimisation of anything
in the foreground that may eclipse
the action
The sizes, colours and direction of
view accentuate the key elements
Remember – you’ve been
thinking about your system for
weeks or months, but this is new
to the reader of the report!
11
MMG Skills Lecture Series
Diagrams: for written reports - AIMVIEW
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Now for the tricks in creating a highquality image
When choosing the aspect, use a modest
quality for the wave functions, atoms,
bonds…
When you’ve hit on the final view, up the
accuracies of these terms
Go to the save image
Up the resolution of the output
Save as a “png” (portable network
graphics)
Open the png file in gimp
Save it as a jpeg (Joint Photographic
Experts Group)
If you’re using the file in a power-point
poster or talk, you’re done
If you’re using LaTeX, then you’ll want an
eps file.
Use “sam2p” to convert from jpeg to eps:
sam2p -c:jpeg file.jpg EPS: file.eps
12
MMG Skills Lecture Series
Diagrams: for written reports - AIMVIEW
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Now for the tricks in creating a highquality image
When choosing the aspect, use a modest
quality for the wave functions, atoms,
bonds…
When you’ve hit on the final view, up the
accuracies of these terms
Go to the save image
Up the resolution of the output
Save as a “png” (portable network
graphics)
Open the png file in gimp
Save it as a jpeg (Joint Photographic
Experts Group)
If you’re using the file in a power-point
poster or talk, you’re done
If you’re using LaTeX, then you’ll want an
eps file.
Use “sam2p” to convert from jpeg to eps:
sam2p -c:jpeg file.jpg EPS: file.eps
13
MMG Skills Lecture Series
Diagrams: for written reports - AIMVIEW
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Now for the tricks in creating a highquality image
When choosing the aspect, use a modest
quality for the wave functions, atoms,
bonds…
When you’ve hit on the final view, up the
accuracies of these terms
Go to the save image
Up the resolution of the output
Save as a “png” (portable network
graphics)
Open the png file in gimp
Save it as a jpeg (Joint Photographic
Experts Group)
If you’re using the file in a power-point
poster or talk, you’re done
If you’re using LaTeX, then you’ll want an
eps file.
Use “sam2p” to convert from jpeg to eps:
sam2p -c:jpeg file.jpg EPS: file.eps
14
MMG Skills Lecture Series
Diagrams: for written reports - AIMVIEW
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Now for the tricks in creating a highquality image
When choosing the aspect, use a modest
quality for the wave functions, atoms,
bonds…
When you’ve hit on the final view, up the
accuracies of these terms
Go to the save image
Up the resolution of the output
Save as a “png” (portable network
graphics)
Open the png file in gimp
Save it as a jpeg (Joint Photographic
Experts Group)
If you’re using the file in a power-point
poster or talk, you’re done
If you’re using LaTeX, then you’ll want an
eps file.
Use “sam2p” to convert from jpeg to eps:
sam2p -c:jpeg file.jpg EPS: file.eps
15
MMG Skills Lecture Series
Diagrams: for written reports - AIMVIEW
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Now for the tricks in creating a highquality image
When choosing the aspect, use a modest
quality for the wave functions, atoms,
bonds…
When you’ve hit on the final view, up the
accuracies of these terms
Go to the save image
Up the resolution of the output
Save as a “png” (portable network
graphics)
Open the png file in gimp
Save it as a jpeg (Joint Photographic
Experts Group)
If you’re using the file in a power-point
poster or talk, you’re done
If you’re using LaTeX, then you’ll want an
eps file.
Use “sam2p” to convert from jpeg to eps:
sam2p -c:jpeg file.jpg EPS: file.eps
16
MMG Skills Lecture Series
Diagrams: for written reports - AIMVIEW
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Now for the tricks in creating a highquality image
When choosing the aspect, use a modest
quality for the wave functions, atoms,
bonds…
When you’ve hit on the final view, up the
accuracies of these terms
Go to the save image
Up the resolution of the output
Save as a “png” (portable network
graphics)
Open the png file in gimp
Save it as a jpeg (Joint Photographic
Experts Group)
If you’re using the file in a power-point
poster or talk, you’re done
If you’re using LaTeX, then you’ll want an
eps file.
Use “sam2p” to convert from jpeg to eps:
sam2p -c:jpeg file.jpg EPS: file.eps
17
MMG Skills Lecture Series
Diagrams: for written reports - AIMVIEW
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Now for the tricks in creating a highquality image
When choosing the aspect, use a modest
quality for the wave functions, atoms,
bonds…
When you’ve hit on the final view, up the
accuracies of these terms
Go to the save image
Up the resolution of the output
Save as a “png” (portable network
graphics)
Open the png file in gimp
“Save-as” it as a jpeg (Joint Photographic
Experts Group)
If you’re using the file in a power-point
poster or talk, you’re done
If you’re using LaTeX, then you’ll want an
eps file.
Use “sam2p” to convert from jpeg to eps:
sam2p -c:jpeg file.jpg EPS: file.eps
18
MMG Skills Lecture Series
Diagrams: for written reports - AIMVIEW
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Now for the tricks in creating a highquality image
When choosing the aspect, use a modest
quality for the wave functions, atoms,
bonds…
When you’ve hit on the final view, up the
accuracies of these terms
Go to the save image
Up the resolution of the output
Save as a “png” (portable network
graphics)
Open the png file in gimp
“Save-as” it as a jpeg (Joint Photographic
Experts Group)
If you’re using the file in a power-point
poster or talk, you’re done
If you’re using LaTeX, then you’ll want an
eps file.
Use “sam2p” to convert from jpeg to eps:
sam2p -c:jpeg file.jpg EPS: file.eps
19
MMG Skills Lecture Series
Diagrams: for written reports - AIMVIEW
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Now for the tricks in creating a highquality image
When choosing the aspect, use a modest
quality for the wave functions, atoms,
bonds…
When you’ve hit on the final view, up the
accuracies of these terms
Go to the save image
Up the resolution of the output
Save as a “png” (portable network
graphics)
Open the png file in gimp
“Save-as” it as a jpeg (Joint Photographic
Experts Group)
If you’re using the file in a power-point
poster or talk, you’re done
If you’re using LaTeX, then you’ll want an
eps file.
Use “sam2p” to convert from jpeg to eps:
sam2p -c:jpeg file.jpg EPS: file.eps
20
MMG Skills Lecture Series
Diagrams: for written reports - AIMVIEW
Do not generate the eps directly from gimp!
Of course, you can make pictures of structures without
wave functions in the same way (c.f. xbs).
21
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
POV-Ray = Persistence
of Vision ray-tracing
It is not trivial, but most
of the hard work for the
HFI tensors has already
been done
1. By AIMPRO
2. By HFI2POV
"Shorebirds" by Jim Charter (2000)
Wildlife inhabiting the boundary zone between land and sea.
www.POV-Ray.org
22
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
What is a hyperfine interaction?
What is a tensor?
23
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
For some molecules, radical and crystal defects there are
one or more unpaired electrons that interact with
nuclear spins, so that in a magnetic field…
The details of the interaction tensor take the form of
three magnitudes and three directions (of course). The
directions form an orthogonal set, and beyond any
symmetry, the magnitudes may take any values.
The question is how do you succinctly present this in a
report?
A table?
A structure?
24
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
I personally favour a combination of table for
the numerical values of the tensor elements, but
combine it with a figure to help show how the
directions relate to the (say) relative positions of
radical sites.
HFI2POV takes AIMPRO output and generates
POV-Ray input.
25
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
HFi2POV usage:
HFi2POV <options> [AIMPRO HFi output FILE]
Options:
-h
This information
-o
<x y z>
The origin of the cutout
-v
<9 numbers>
The three basis vectors for the cutout
-l
<a b c>
The lengths of the cuboid in the directions
of the basis vectors
To compile the image, you'll need to make sure that the orientation
of the camera and object is correct. The povray compilation may be
something like
'povray +A -D +J +H800 +W800 +V -lPOV.pov'
to generate an 800x800 pixel rendered image (POV.png).
Internal to the POV.pov dile are the TYPE and SITE bolean flags to
turn on/off the sets of equivilent sites, and individial atoms in
the hyperfine tensors.
Also, the arrows showing the principal direcation
are defined by the parameters:
#declare HFIscale = 1;
#declare ArrowPoint = 0.7;
#declare ArrowCone = 3;
Have fun with variying these paramters and everything else to get
publication quality images.
Copyright JPG Sept 2008
For an AIMPRO output file
containing HFI tensors called out,
you execute:
HFi2POV out
(perhaps with other flags)
and get three files:
POV.pov
POV.xyz
USED.dat
You compile the image:
povray +A -D +J +H800 +W800
+V -lPOV.pov
The resolution is dictated by the 800’s
in this case.
You get a new file:
POV.png…
26
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
This is the default orientation
in the POV.pov file
We need to do a bit of
manipulation to get it right
Therefore we need to know a
(very) little POV-Ray
In the POV.pov file there are
two places you need to update.
The first is to add some
rotations:
The z-axis is out of the screen
(always), the x-axis is
horizontal and the y is
vertical…
27
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
Look for this in the file:
/********************************************************************/
/* End of union: put transformations here... ************************/
/********************************************************************/
After it you can add
terms like “rotate -45*z”
to rotate anti-clockwise
by 45°.
28
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
Now we rotate about the
x-axis by 90°
29
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
We can see that the
centring is important, so
we can translate using
“translate <1,1,1>”, or
whatever displacement
suits…
30
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
And to zoom in, we
change something else.
Look for “direction” in
the camera definition:
increasing the value of z
effectively moves the
camera toward the
object…
31
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
But we can’t really see
what’s going on here, so
we rotate it about y by a
small angle…
But it’s still pretty
difficult to see what’s
going on
We don’t need all the
arrows,
and we can shave off a few
atoms in the foreground
32
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
We can either work out
which atoms we want to
remove, or go back and
chop out a different
volume using HFi2POV
33
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
The HFi arrows can be
turned on and off using
parameters set in the
POV.pov file:
The species are listed in
types and sites: equivalent
sites are of the same type
We’ll keep one of each
type…
34
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
We can reverse any of the
vector directions without
affecting the physics
We do this by finding the
vector we want in POV.pov
and change the sign of the
vector
35
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
The HFi arrows can be
turned on and off using
parameters set in the
POV.pov file:
The species are listed in
types and sites: equivalent
sites are of the same type
We’ll keep one of each
type…
36
MMG Skills Lecture Series
Diagrams: for written reports - POV-Ray
Finally, you may need to
annote the figure, in the
example to distinguish
between the carbon site.
This can be done most
simply using xfig…
37
MMG Skills Lecture Series
Diagrams: for written reports - xfig
38
MMG Skills Lecture Series
Diagrams: for written reports - xfig
This is a pretty basic
drawing package
You can plot basic
shapes, lines and curves,
or add text or import
graphics files…
39
MMG Skills Lecture Series
Diagrams: for written reports - xfig
For each of these items, there are user definable
qualities such as line thickness, colour, style and so on.
The “depth” value allows you to define which elements
lie in front or behind others.
40
MMG Skills Lecture Series
Diagrams: for written reports - xfig
You can edit you figure using a
range of tools familiar to most
of you…
Move
Copy
Rotate
Scale
…
Others may be more obscure
you can group and ungroup as
in Power point
edit brings up a dialogue box
to change settings
41
MMG Skills Lecture Series
Diagrams: for written reports - xfig
The “File” menu allows you to export your figure to eps
or some other image-file type.
42
MMG Skills Lecture Series
Diagrams: for written reports - xfig
Beware: the text you add to a figure on the screen does
not match that produced in an eps file.
This may relate to both size and position.
For papers, xfig text annotation interfaces well with
LaTeX using the “psfrag” package.
43
MMG Skills Lecture Series
Diagrams: for written reports - psfrag
The text in the eps file is
discarded, and replaced with
LaTeX text.
This maintains consistency
with fonts and font sizes
It means you don’t have to
worry about complex notation
in xfig.
You may have to play around
with the location of the text to
get the desired finished
product.
44
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
We’ll now look at two examples of using gnuplot
to produce publication quality graphs.
A band structure
A formation energy
What information are we hoping to show in a
band structure plot?
45
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
Typically we’ll have several
data sets to plot on the same
graph:
Maybe two spin states
A context, such as the bulk
bands as a reference
We need to ensure that they’re
all mutually consistent (i.e.
basis, sampling, lattice
constant etc).
I tend to plot the bulk as solid
lines, and the analysis for a
defect as points
Goss et al Phys. Rev. B 76, 075204 (2007)
46
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
However, the default
appearance of a gnuplot
graph is pretty poor.
Let’s go through some
steps to getting a
polished image for
incorporation in a paper.
What’s wrong with the
graph shown in the
figure?
gnuplot of “sin(x)”
47
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
The formatting of the
numbers:
set format y “%.1f”
48
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
The lack of labels on the
axes:
set xlabel “x”
49
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
Choose a y-range
set yrange [-1.1:1.1]
50
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
Remove the legend:
unset key
51
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
But these are just screen-shots
– we want images (e.g. jpeg,
eps, …)
When you run gnuplot
interactively you are using a
“x11” terminal, but we want
something else now.
Typically we want eps
(encapsulated postscript).
set terminal postscript eps
set output “file.eps”
What’s happened?
What’s wrong now?
52
Eps file
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
The font-size
The font-type
The line-thickness
Everything is black and white
It also may be that the sampling of the function
is not particularly great…
53
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
Fonts:
set terminal postscript eps “Times-Roman” 24
Line thickness:
Either in the plot:
plot sin(x) lw 2
Or in the terminal
set terminal postscript eps lw 2 “Times-Roman” 24
Black and white to colour:
set terminal postscript eps color lw 2 “Times-Roman” 24
54
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
55
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
Sampling:
When plotting a function, it is “sampled”.
The sampling density is defined by the variable
“sample”.
set sample x, y
“x” is the number of points calculated in our plot.
“y” is for surface plots.
(See “help sample”.)
56
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
sample 30
57
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
sample 80
58
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
Still in error:
The “x” and “y” are maths objects (should be in
itallics).
Individual terms can be modified in “enhanced” eps:
set terminal postscript enhanced eps color lw 2 “Times-Roman” 24
Then
set xlabel “{/Times-Roman-Itallic x} (radians)”
set ylabel “{/Times-Roman-Itallic y}”
59
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
60
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
The band-structure can be
plotted from the bandst.plt.
This is a two (or three) column
format that gnuplot
understands as
X
Y
(Z)
A quick plot can be generated
“ plot ‘file’ ”, (postscript)
which generates the basic
plot…
What’s wrong with this image?
61
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
62
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
1. There is too much data
Do all the valence bands need to be included?
2. Which are filled?
…and which are empty?
3. Are enough empty bands plotted?
What is the test?
4.
5.
6.
7.
8.
63
Should we use symbols or lines?
Colour?
Fonts and key?
What are the x-axis labels?
This is a spin polarised system – is that evident?
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
Some elements are corrected in
these plots, but not all
Set the x and y axis labels
Add colour
Change font
Zoom in on important energy
range
In making some improvements
we also expose problems
Spin polarised data leads to some
bands being obscured
What is the zero of energy?
What’s diamond and what’s
defect?
…and some remain
The filled/empty distinction
The x-axis tick-marks
The number of empty bands
64
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
We need to do something which engages our
brains a bit more
We need to reformat the data – note there is not
just one way to do this!
We need to consider what information we are trying
to communicate…
…and what achieves this in clearest way.
We need to consider the data in context of the
physical system.
65
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
Let’s assume we will
persist with the
bandst.plt data file.
The three columns are
“k”, “Energy, spin up”,
“Energy, spin down”.
Each “band” is separated
(for plotting by gnuplot)
by a blank line.
66
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
Let’s assume we will persist with
the bandst.plt data file.
The three columns are “k”,
“Energy, spin up”, “Energy, spin
down”.
Each “band” is separated (for
plotting by gnuplot) by a blank
line…
This signifies a break in the data
and if the points are joined with
lines, this step is missed out.
If there were two blank lines, this
would tell gnuplot that you’ve got
a new set of data: these are
numbered using the “index”
variable.
67
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
We can use indexes to
separate occupied and empty
bands.
In the example, we know there
are 433 occupied up-bands &
432 occupied down-bands.
We find the 433rd blank line
and double it – we have
reformatted the data.
Then we use the plot
command shown
This only includes spin up:
can you see why?
68
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
We want to show both spin up
and spin down, so we need to
do something more elaborate.
Again, starting with the
“bandst.plt” file, we need to
treat the up and down
separately.
This can be done using
indexing, with a two column
format
This can be done using
~njpg/bin/SplitPLT
Up and occupied
Up and empty
Down and occupied
Down and empty
69
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
70
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
This is still completely inappropriate for a
paper…
Lets change the symbols, add more empty bands
and set the energy zero at the valence band
top…
71
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
72
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
We might make life easier by using a “butterfly
plot along the x-axis.
73
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
Now, to place further into context, lets add the bands
from the bulk cell of the same basic composition as the
defect cell…
74
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
75
MMG Skills Lecture Series
Diagrams: for written reports - gnuplot
A bit of finesse…
Fewer points, larger font…
Dividing line…
76
MMG Skills Lecture Series
Diagrams: Summary
Making clear diagrams can be very quick…
Run-time diagnostics
Quick data analysis
…or very time-consuming
Publication quality diagrams
In preparing your thesis, a lot of time is likely to
me consumed in the making of diagrams, so
adopting a style for consistency and efficiency is
very helpful early on.
77
MMG Skills Lecture Series
Download