2
$\begingroup$

I want to save a certain graphics by pressing a button. Thinks work fine for something like this

Button["Save",
 export = Histogram[RandomVariate[NormalDistribution[0, 1], 10^3]];
 Export["test.pdf", export]
 ]

By increasing the number of data points the button press doesn`t generate test.pdf file anymore

Button["Save",
 export = Histogram[RandomVariate[NormalDistribution[0, 1], 10^7]];
 Export["test.pdf", export]
 ]

Simply executing

Export["test.pdf", export]

after pressing the button, generats the pdf file. What is the cause of this behaviour?

Thanks in advance for your help

$\endgroup$
  • 2
    $\begingroup$ it might be "timing out" on your system. Try Method->"Queued" $\endgroup$ – Mike Honeychurch Jul 14 '14 at 9:37
  • $\begingroup$ thanks... it works with Method->"Queued" $\endgroup$ – Jozef Jul 15 '14 at 8:28
1
$\begingroup$

Try this:

export = Histogram[RandomVariate[NormalDistribution[0, 1], 10^7]];
Button["Save", Export["test.pdf", export]]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.