Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config/plot_porkchop.json.empty
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
// display more or less details. If 0 no cutoff is assumed.
"transfer_deltaV_cutoff" : 0,

// Indicate if plotting should be done with interpolation (countourf) or not (pcolormesh).
"interpolation" : false,

// Plot title or not, title includes information on the plot but isn't desired for publication.
// Give "True" if title is desired, "False" if not.
"title" : "",
Expand Down
12 changes: 11 additions & 1 deletion python/plot_porkchop.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,17 @@
cmap = plt.get_cmap(config['colormap'])
fig=plt.figure()
ax1 = fig.add_subplot(111)
data = ax1.contourf(y1,x1,z,cmap=cmap)

if config['interpolation']==True:
data = ax1.contourf(y1,x1,z,cmap=cmap)

if config['interpolation']==False:
y2 = np.row_stack((y1,y1[-1]+(y1[-1]-y1[-2])))
y3 = np.column_stack((y2,y2[:,-1]))
x2 = np.column_stack((x1,x1[:,-1]+(x1[:,-1]-x1[:,-2])))
x3 = np.row_stack((x2,x2[-1]))
data = ax1.pcolormesh(y3,x3,z,cmap=cmap)

cbar = plt.colorbar(data, cmap=cmap)
formatter = matplotlib.ticker.ScalarFormatter(useOffset=False)
ax1.xaxis.set_major_formatter(formatter)
Expand Down