Re: How to make the Mathematica Kernel return DisplayPackets?
- To: mathgroup at smc.vnet.net
- Subject: [mg45990] Re: [mg45965] How to make the Mathematica Kernel return DisplayPackets?
- From: John Fultz <jfultz at wolfram.com>
- Date: Mon, 2 Feb 2004 05:20:24 -0500 (EST)
- Reply-to: jfultz at wolfram.com
- Sender: owner-wri-mathgroup at wolfram.com
On Sat, 31 Jan 2004 05:20:28 -0500 (EST), Sascha Kratky wrote:
>
> Hi,
>
> I am trying to use the Mathematica Kernel to render graphics into
> Postscript. E.g., using Mathink I am sending the following expression
> to the kernel wrapped in an EvaluatePacket:
>
> Show[ListPlot[Table[Prime[n], {n, 20}]]]
>
> The Kernel however does not send back DisplayPackets but returns a
> "Graphics" expression with graphic primitives but without any
> Postscript data in it. Do I have to use a different packet type to make
> the Kernel return the rendered Postscript image?
>
> Thanks,
> Sascha Kratky
It sounds like maybe your $DisplayFunction isn't set to send PostScript to
the $ParentLink. This is easy enough to fix. Just evaluate...
<<PSDirect`
before trying your plotting commands. Note that you'll *still* get the
Graphics expression, as the Graphics expression is the output of this
function and the DisplayPackets are only side effects (similar to how
Print[] creates side effect TextPackets).
Sincerely,
John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.