Commit 440b6528 authored by Maxime Rey's avatar Maxime Rey
Browse files

Aethetics: changed maps default saving format to svg.

parent 2ceef8c8
......@@ -169,9 +169,9 @@ def starmap(RamsesDir, timestep, zoom=1/0.7, factor=1, var1='x', var2='y',bins=3
proj = "BLEH" # need to set it up properly.
if imsave:
if imsave==True:
fig.savefig(f"{RamsesDir.partition('/')[2][:-1]}_{proj}_{timestep}.png", bbox_inches='tight')
fig.savefig(f"{RamsesDir.partition('/')[2][:-1]}_{proj}_{timestep}.svg", bbox_inches='tight')
else:
fig.savefig(f"{imsave}/{RamsesDir.partition('/')[2][:-1]}_{proj}_{timestep}.png", bbox_inches='tight')
fig.savefig(f"{imsave}/{RamsesDir.partition('/')[2][:-1]}_{proj}_{timestep}.svg", bbox_inches='tight')
###################################################################################################################################
......@@ -276,9 +276,9 @@ def levelmap(RamsesDir, timestep, zoom=1/0.7, factor=1, in_pc=False, style='proj
if imsave:
if imsave==True:
fig.savefig(f"{RamsesDir.partition('/')[2][:-1]}_{proj}_{timestep}.png", bbox_inches='tight')
fig.savefig(f"{RamsesDir.partition('/')[2][:-1]}_{proj}_{timestep}.svg", bbox_inches='tight')
else:
fig.savefig(f"{imsave}/{RamsesDir.partition('/')[2][:-1]}_{proj}_{timestep}.png", bbox_inches='tight')
fig.savefig(f"{imsave}/{RamsesDir.partition('/')[2][:-1]}_{proj}_{timestep}.svg", bbox_inches='tight')
......@@ -483,9 +483,9 @@ def qtymap(RamsesDir, timestep, zoom=1/0.7, factor=1, var_str='nH', wei_str="nH"
ax.add_artist(scalebar)
if imsave:
if imsave==True:
fig.savefig(f"{RamsesDir.partition('/')[2][:-1]}_{proj}_{timestep}.png", bbox_inches='tight',pad_inches = 0)
fig.savefig(f"{RamsesDir.partition('/')[2][:-1]}_{proj}_{timestep}.svg", bbox_inches='tight',pad_inches = 0)
else:
fig.savefig(f"{imsave}/{RamsesDir.partition('/')[2][:-1]}_{proj}_{timestep}.png", bbox_inches='tight',pad_inches = 0)
fig.savefig(f"{imsave}/{RamsesDir.partition('/')[2][:-1]}_{proj}_{timestep}.svg", bbox_inches='tight',pad_inches = 0)
......@@ -729,7 +729,7 @@ def change_basis(RamsesDir,timestep,factor=1):
###################################################################################################################################
############################################################# Savings #############################################################
###################################################################################################################################
def save_img(map,cmap='viridis', name_file='kiwi.png'):
def save_img(map,cmap='viridis', name_file='kiwi.svg'):
"""
Saves a map. This is mainly a note as I always forget how to do it with imshow.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment