how to save the screen (qt.view()) to figures

Asked by wangxiaoliang

in Yade, qt.view() will show nice picture of the trixial cell in a window,

1) can I modify the color of background in the view, usually gray, I want to change it into white

2) How can I save the view into a figure

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Klaus Thoeni
Solved:
Last query:
Last reply:
Revision history for this message
Best Klaus Thoeni (klaus.thoeni) said :
#1

Hi,

you can change the background color either by using yade's controller -
>Display OpenGLRenderer bgColor

or by using python:

from yade import qt
qtr = qt.Renderer()
qtr.bgColor=[1,1,1]

To get a single figure of the current view just use a screen-shot (print
screen). If you want to save figures periodically during a simulation you
should use the SnapshotEngine.

HTH
Klaus

On Thu, 27 Sep 2012 04:20:59 PM wangxiaoliang wrote:
> New question #209690 on Yade:
> https://answers.launchpad.net/yade/+question/209690
>
> in Yade, qt.view() will show nice picture of the trixial cell in a window,
>
> 1) can I modify the color of background in the view, usually gray, I want
> to change it into white
>
> 2) How can I save the view into a figure

Revision history for this message
wangxiaoliang (wangxiaoliang) said :
#2

Thanks Klaus Thoeni, that solved my question.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#3

You can also hit "v" to save a pdf figure.
Type "h" in the 3D view to see available keys.