Closed mondracek closed 8 months ago
Make sure that the shrink factor shrink=0.5
also looks reasonable for square images. It could be that you need to adjust it dynamically based on the image aspect ratio to something like shrink=(y_dim/x_dim)
.
@NikoOinonen, thanks, good catch. I have uploaded a new commit to #251, which hopefully deals with the aspect ratio.
Closed by #251.
The figures generated with the
--cbar
option on and saved as PNG have the color-scale bar on their side too big. Compare this figure created by the current version of our code and a version of the same figure after the change I am going to proposeThe change would consist just in putting
plt.colorbar(shrink=0.5)
here https://github.com/Probe-Particle/ppafm/blob/18a5d8a68158e5ffc76d7988bb3e9a6a3b86ff2d/ppafm/PPPlot.py#L98By the way, do not worry that the images I am comparing above as examples also have different contrast: The one generated with the code in our current main branch is wrong because of #250, but that is a separate issue (although if you do not mind solving it with one pull request, it may save me some hassle). Note that we need the above figure for the paper we are writing, which is why I started worrying about both factual correctness and nice layout.