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 open only one plot in new window.

When I use <<JavaGraphics` all plots open in new windows.

I put <<JavaGraphics` before one last plot but it works for all plots.

How can I do this?

share|improve this question
1  
Why don't you just use the notebook interface? –  Szabolcs May 2 '13 at 3:04
add comment

1 Answer

Graphics has an option, DisplayFunction, that determines what happens with the graphic. The default setting is DisplayFunction :> $DisplayFunction, and in a normal Mathematica session, $DisplayFunction is Identity. This means that nothing special is done with the graphic, and (since Mathematica V6) the frontend just renders the output as a graphic (instead of literally showing Graphics[...].)

When you load JavaGraphics, the definition of $DisplayFunction is redefined, to a function System`Private`JavaDisplay that creates a bitmap of the graphic and puts it up in a new Java window. Since $DisplayFunction has been changed globally, this is done for all graphics that are generated after JavaGraphics` has been loaded.

If you only want to create a separate window for a single plot, you can specify the DisplayFunction option for just that plot, like so:

Plot[Sin[x], {x, 0, 10}, DisplayFunction -> CreateDialog]

instead of loading JavaGraphics`.

share|improve this answer
add comment

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.