Group Abstract Group Abstract

Message Boards Message Boards

Create GUI Button for the Manipulate to export selected data?

Posted 6 years ago
POSTED BY: T P
3 Replies
POSTED BY: Morton Goldberg
Posted 6 years ago

I've been told to use the save function instead of export, what is this?

https://reference.wolfram.com/language/ref/Save.html

When would it be advantageous to use this feature?

POSTED BY: T P

Perhaps something like this?

SetOptions[
   Plot, {ImageSize -> 400, AspectRatio -> 0.2, 
    ImagePadding -> {{100, 1}, {10, 10}}, Frame -> True}];

path = FileNameJoin[{$HomeDirectory, "DeskTop", "plots.png"}];

Manipulate[
   plots = Panel @
     Column[
        {Plot[x, {x, 1, 4}, Epilog -> {Line[{{y, 0}, {y, 10}}]}], 
         Plot[x^z/4^z, {x, 1, 4}, Epilog -> {Line[{{y, 0}, {y, 10}}]}]}],
   {plots, None},
   {y, 1, 4},
   {z, 1, 10, 1},
   Row[
      {Spacer[140],
       Button["Export Plots", Export[path, plots], 
         Method -> "Queued", ImageSize -> Automatic]}],
   TrackedSymbols :> {y, z}]

panel

Clicking on the button, produces the following PNG:

plots

POSTED BY: Morton Goldberg
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard