Skip to content
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

Setting window titles when in interactive mode #5559

Closed
lilynguyen opened this issue Nov 25, 2015 · 8 comments
Closed

Setting window titles when in interactive mode #5559

lilynguyen opened this issue Nov 25, 2015 · 8 comments

Comments

@lilynguyen
Copy link

Perhaps it's only a version issue that you cannot set a window title (fig.canvas.set_window_title('title')) for a figure when it's in interactive mode. I'm currently working with LeapMotion which right now can only work with in python v2.7 and mpl v1.4.3 which co-depends on numpy v1.6.1. I have tried newer versions of both numpy and mpl and it doesn't like python 2.7 and LeapMotion, both of which are necessary.

Is there a workaround for this or do I have to settle for "Figure1?"
It's not the end of the world, of course, but it's a nice customization!

edit:
not an interactive mode issue. still exploring the actual issue. sorry for the wasted issue!

@tacaswell
Copy link
Member

You can also pass a string into the figure creation code (I think that shipped in 1.4.x)

@lilynguyen
Copy link
Author

Do you mean fig = plt.figure(figsize=(8,6),'title')?

@tacaswell
Copy link
Member

See http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.figure
num is badly named (but we can not change it for back-compatibilty
reasons.

fig = plt.figure('my fancy fig', ...) should work.

On Wed, Nov 25, 2015 at 10:14 PM Lily Nguyen notifications@github.com
wrote:

Do you mean fig = plt.figure(figsize=(8,6),'title')?


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

@lilynguyen
Copy link
Author

Wow I totally just skipped over the desc of that arg - thought it could only take ints.
Currently I have self.fig = plt.figure('signum', figsize=(15,10), facecolor='black', tight_layout=True)
'signum' being the name of the game I'm trying to create. Unfortunately this still doesn't work with that I'm working with - still says 'Figure1'. :(
Is this affected by the fact that this is all in a class?
Or that I'm adding a few subplots to self.fig?

@WeatherGod
Copy link
Member

Which backend? I think some backends don't implement title setting
correctly.
On Nov 27, 2015 9:55 PM, "Lily Nguyen" notifications@github.com wrote:

Wow I totally just skipped over the desc of that arg - thought it could
only take ints.
Currently I have self.fig = plt.figure('signum', figsize=(15,10),
facecolor='black', tight_layout=True)
'signum' being the name of the game I'm trying to create. Unfortunately
this still doesn't work with that I'm working with - still says 'Figure1'.
:(
Is this affected by the fact that this is all in a class?
Or that I'm adding a few subplots to self.fig?


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

@lilynguyen
Copy link
Author

Which backend? I think some backends don't implement title setting
correctly.

What do you mean which backend?
If it means anything both fig.canvas.set_window_title and the num argument work when I'm doing simple plotting for mpl. Seems to be integration with LeapMotion that is doing it in unfortunately.

@rvalenzuelar
Copy link

Is this issue still open? I have the same problem when trying to use fig.canvas.set_window_title. I'm using Qt5Agg backend.

@tacaswell
Copy link
Member

@rvalenzuelar Please open a new issue.

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

No branches or pull requests

4 participants