spinw icon indicating copy to clipboard operation
spinw copied to clipboard

Plotting of all SpinW coordinate systems

Open henrikjacobsenfys opened this issue 8 years ago • 7 comments

It would be neat to be able to plot the xyz coordinate systems and the a^, b^ and c^* coordinate systems when using the plot() command.

henrikjacobsenfys avatar Feb 13 '17 12:02 henrikjacobsenfys

It is in 921417b! I added the option to choose 'abc', 'xyz' and 'hkl' coordinate systems to show. Use: swplot.plotbase('mode','hkl'), etc. Let me know if this is what you wanted!

tsdev avatar Feb 13 '17 15:02 tsdev

This is very nice! Is it possible to make it so that more than one coordinate system can be plotted simultaneously?

henrikjacobsenfys avatar Feb 13 '17 17:02 henrikjacobsenfys

It is possible. You have to use the separate command that plots the coordinate system: swplot.plotbase('mode','xyz','replace',false) Setting the replace option to false will avoid deleting the previous coordinate system. You also have to shift the new coordinate system, check out the help for details: help swplot.plotbase

tsdev avatar Feb 14 '17 08:02 tsdev

Hi again It seems to me that there might be a bug in the plotting. Example:

test = spinw; test.genlattice('lat_const',[4.684 3.423 5.129],'angled',[90 110 90],'sym','C 2/c') plot(test,'range',[1 1 1 ]) swplot.plotbase('replace',false,'mode','hkl','shift',[-3;0;0])

In this case, L is quite different from c, but h is identical to a, which I think shouldn't be the case. (edited using the 'replace' false option)

henrikjacobsenfys avatar Feb 14 '17 09:02 henrikjacobsenfys

Simple example: plot(spinw('https://goo.gl/kQO0FJ')); swplot.plotbase('replace',false,'mode','xyz','shift',[-3;0;0])

tsdev avatar Feb 14 '17 09:02 tsdev

I fixed it, hopefully it is right now: def8482

tsdev avatar Feb 14 '17 09:02 tsdev

Seems to work, thanks!

henrikjacobsenfys avatar Feb 14 '17 09:02 henrikjacobsenfys