Skip to content

Commit

Permalink
#6 output to the right folder
Browse files Browse the repository at this point in the history
  • Loading branch information
webgisdeveloper committed Jan 1, 2022
1 parent 7a092ff commit 6b85231
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sldtool.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def plotcolorbar(legendname, colortheme, vminmax, vminmax_disp):
vmin_disp, vmax_disp = vminmax_disp
tick_text = ["{:.2f}".format(vmin_disp),"{:.2f}".format(0.5*vmin_disp),0, "{:.2f}".format(0.5*vmax_disp),"{:.2f}".format(vmax_disp)]
cb.ax.set_xticklabels(tick_text, fontsize=9)
plt.savefig(legendname + ".png", format="PNG", bbox_inches='tight',pad_inches = 0.05, aspect="auto", transparent=False)
plt.savefig(os.path.join(settings.COLOR_DIR,legendname + ".png"), format="PNG", bbox_inches='tight',pad_inches = 0.05, aspect="auto", transparent=False)

# close fig to release memory
plt.close(fig)
Expand Down Expand Up @@ -258,7 +258,7 @@ def colormapping(geotiffs, method="linear", colortheme="viridis"):

sldheader = sldheader % (SLDname)
colormapentry = '<ColorMapEntry quantity="%s" color="%s"/>'
with open(SLDname + ".sld", "w") as f:
with open(os.path.join(settings.COLOR_DIR,SLDname + ".sld"), "w") as f:
f.write(sldheader + "\n")
for entry in colorlist:
value, color = entry
Expand Down

0 comments on commit 6b85231

Please sign in to comment.