pgfPicture(mypict,opts,filename)
If the filename is without a .tex suffix, it will be added.
The source of this document is in Graphics.m2:1903:0.