Thanks to visit codestin.com
Credit goes to github.com

Skip to content

added resize parameter to plot 2d-arrays using figimage #4315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 11, 2015

Conversation

mehdimu
Copy link
Contributor

@mehdimu mehdimu commented Apr 6, 2015

See #3420 ,

Tried implementing the feature by adding a "resize" parameter in the figimage, which resizes the figure based on the image size.

@@ -568,6 +568,7 @@ def hold(self, b=None):
self._hold = b

def figimage(self, X,
resize=False,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be the last kwarg in case anyone is using this function with only positional arguments (python 3 has a nice way around that, but alas, we still support 2).

@tacaswell
Copy link
Member

This needs an entry in whats_new please.

@tacaswell
Copy link
Member

One last thing, can you update plt.saveimg to use this flag instead of having the same logic in the code twice?

@tacaswell tacaswell added this to the next point release milestone Apr 11, 2015
@mehdimu
Copy link
Contributor Author

mehdimu commented Apr 11, 2015

are you talking about plt.imsave or plt.savefig? thanks!

@tacaswell
Copy link
Member

Imsave

On Fri, Apr 10, 2015, 23:11 Ali Mehdi [email protected] wrote:

are you talking about plt.imsave or plt.savefig? thanks!


Reply to this email directly or view it on GitHub
#4315 (comment)
.

@tacaswell
Copy link
Member

@AliMehdi92 Thanks, sorry for my semi-jibberish requests!

tacaswell added a commit that referenced this pull request Apr 11, 2015
ENH : added resize parameter figimage

Match the figure size to image size
@tacaswell tacaswell merged commit 1b11d9d into matplotlib:master Apr 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants