Skip to content

Commit

Permalink
Merge pull request #477 from mikibonacci/fix/plotting-scripts
Browse files Browse the repository at this point in the history
Fixing the python plotting scripts generated in kslice.F90
  • Loading branch information
giovannipizzi authored Feb 16, 2024
2 parents e27db87 + d1ad832 commit c29d331
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/postw90/kslice.F90
Original file line number Diff line number Diff line change
Expand Up @@ -749,8 +749,8 @@ subroutine k_slice(pw90_berry, dis_manifold, fermi_energy_list, kmesh_info, kpt_
//"extent=(min(x_coord),max(x_coord),min(y_coord)," &
//"max(y_coord)))"
write (scriptunit, '(a)') "else: "
write (scriptunit, '(a)') " valint = ml.griddata(points_x," &
//"points_y, val_log, xint, yint)"
write (scriptunit, '(a)') " valint = interpolate.griddata((points_x," &
//"points_y), val_log, (grid_x,grid_y), method='nearest') # or 'cubic' or 'nearest'"
write (scriptunit, '(a)') " mn=int(np.floor(valint.min()))"
write (scriptunit, '(a)') " mx=int(np.ceil(valint.max()))"
write (scriptunit, '(a)') " ticks=range(mn,mx+1)"
Expand Down Expand Up @@ -788,8 +788,8 @@ subroutine k_slice(pw90_berry, dis_manifold, fermi_energy_list, kmesh_info, kpt_
//"extent=(min(x_coord),max(x_coord),min(y_coord)," &
//"max(y_coord)))"
write (scriptunit, '(a)') "else: "
write (scriptunit, '(a)') " valint = ml.griddata(points_x," &
//"points_y, val, xint, yint)"
write (scriptunit, '(a)') " valint = interpolate.griddata((points_x," &
//"points_y), val_log, (grid_x,grid_y), method='nearest') # or 'cubic' or 'nearest'"
write (scriptunit, '(a)') " pl.imshow(valint,origin='lower'," &
//"extent=(min(xint),max(xint),min(yint),max(yint)))"
write (scriptunit, '(a)') "cbar=pl.colorbar()"
Expand Down Expand Up @@ -1105,7 +1105,6 @@ subroutine script_common(scriptunit, areab1b2, square, seedname)

write (scriptunit, '(a)') "import pylab as pl"
write (scriptunit, '(a)') "import numpy as np"
write (scriptunit, '(a)') "import matplotlib.mlab as ml"
write (scriptunit, '(a)') "from scipy import interpolate"
write (scriptunit, '(a)') "from collections import OrderedDict"
write (scriptunit, '(a)') " "
Expand Down

0 comments on commit c29d331

Please sign in to comment.