# -*- coding: utf-8 -*-
"""
Created on Fri Jan  9 12:52:31 2015

@author: stuart
"""
import os
import glob

import yt

model = 'spruit'
datadir = os.path.expanduser('~/mhs_atmosphere/'+model+'/')

files = glob.glob(datadir+'/*')
files.sort()

print(files)


ds = yt.load(files[0])

slc = yt.SlicePlot(ds, fields='density_bg', normal='x')
slc.save('~/yt.png')
# -*- coding: utf-8 -*-
"""
Created on Fri Jan  9 12:52:31 2015

@author: stuart
"""
import os
import glob

import yt

model = 'spruit'
datadir = os.path.expanduser('~/mhs_atmosphere/'+model+'/')

files = glob.glob(datadir+'/*')
files.sort()

print(files)


ds = yt.load(files[0])

# Axes flip for normal='y'
#ds.coordinates.x_axis = {0: 2, 1: 0, 2: 1, 'x': 2, 'y': 0, 'z': 1}
#ds.coordinates.y_axis = {0: 1, 1: 2, 2: 0, 'x': 1, 'y': 2, 'z': 0}

slc = yt.SlicePlot(ds, fields='density_bg', normal='x')
slc.save('~/yt.png')
Add x-y flipping code for SlicePlot
Add x-y flipping code for SlicePlot
