Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

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

1 Answer 1

Try this:

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

Your Answer

 
discard

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.