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 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
Why don't you just use the notebook interface? – Szabolcs May 2 '13 at 3:04

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

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.