Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

 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

 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

share|improve this question
it might be "timing out" on your system. Try Method->"Queued" – Mike Honeychurch Jul 14 '14 at 9:37
thanks... it works with Method->"Queued" – Jozef Jul 15 '14 at 8:28

Try this:

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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