Skip to content
Snippets Groups Projects
Commit 5f74b6c1 authored by Anton Akhmerov's avatar Anton Akhmerov Committed by Christoph Groth
Browse files

add dpi and fig_size to plotter.map

parent b6e89534
No related branches found
No related tags found
No related merge requests found
......@@ -757,7 +757,8 @@ def mask_interpolate(coords, values, a=None, method='nearest', oversampling=3):
def map(sys, value, colorbar=True, cmap=None,
a=None, method='nearest', oversampling=3, file=None, show=True):
a=None, method='nearest', oversampling=3, file=None, show=True,
dpi=None, fig_size=None):
"""Show interpolated map of a function defined for the sites of a system.
Create a pixmap representation of a function of the sites of a system by
......@@ -814,6 +815,11 @@ def map(sys, value, colorbar=True, cmap=None,
min -= border
max += border
fig = Figure()
if dpi is not None:
fig.set_dpi(dpi)
if fig_size is not None:
fig.set_figwidth(fig_size[0])
fig.set_figheight(fig_size[1])
ax = fig.add_subplot(111, aspect='equal')
if method != 'nearest':
method = 'bi' + method
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment