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

unexpected warning message. #309

Closed
doutriaux1 opened this issue Feb 2, 2018 · 3 comments
Closed

unexpected warning message. #309

doutriaux1 opened this issue Feb 2, 2018 · 3 comments
Assignees
Milestone

Comments

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Feb 2, 2018

@scottwittenburg since your bg fix we now get this message:

import vcs
bg=False
canvas = vcs.init(geometry={"width":1200, "height":800}, bg=bg)
canvas.plot([1,2,3,4])
canvas.png("warn")

returns

/Users/doutriaux1/anaconda2/envs/nightly2/lib/python2.7/site-packages/vcs/VTKPlots.py:1274: UserWarning: You are saving to png of size different from the current canvas.
It is recommended to set the windows size before plotting or at init time.
This will lead to faster execution as well.
e.g
x=vcs.init(geometry=(1200,800))
#or
x=vcs.init()
x.geometry(1200,800)

with bg=True the message does not show

@scottwittenburg
Copy link
Collaborator

@scottwittenburg scottwittenburg commented Feb 2, 2018

I cannot reproduce this with the latest master vcs, whether I set bg=True or bg=False. Maybe I have some other difference in my environment though? Based on the changes I made, that warning should not be showing up given the snippet you provided, and for me, it does not.

Just for some extra discussion however, this warning was in the code before, and I felt there was a case where it made sense to show it. This case is if you init with one size, then try to save a png with a different size. The code will note the current plot size, but resize it for the png save, then resize again back to the original size. It will also show that warning to let you know about the extra renders needed to change size and change back again.

@doutriaux1
Copy link
Contributor Author

@doutriaux1 doutriaux1 commented Feb 2, 2018

hum... Let me try with a fresh environment maybe mine got somehow corrupted

@doutriaux1
Copy link
Contributor Author

@doutriaux1 doutriaux1 commented Feb 2, 2018

ok same here, probably too many vcs installs in my env...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants