Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

what is wrong with this plot?

6 views
Skip to first unread message

Chris Chiasson

unread,
Sep 28, 2005, 1:45:42 AM9/28/05
to
Dear MathGroup,
Plot[x^2,{x,0,10},Epilog->{Text[DisplayForm@ToBoxes[Sqrt[23]/4],{5,50}]}]
How can I achieve the desired effect of the square root with the
fraction inside the plot?
--
Chris Chiasson
http://chrischiasson.com/contact/chris_chiasson

Chris Chiasson

unread,
Sep 28, 2005, 1:47:14 AM9/28/05
to
FormatType->StandardForm doesn't fix it either (but
FormatType->TraditionalForm seems to). Also, things really go south
when exported as EPS. What's going on?

dh

unread,
Sep 29, 2005, 5:43:31 AM9/29/05
to
Hello Chris,
you have to tell Mathematica not to evaluate the expression. This can be
done by "HoldForm": e.g.
HoldForm[Sqrt[23/16]]
sincerely, Daniel

Bob Hanlon

unread,
Sep 29, 2005, 5:52:39 AM9/29/05
to
I get a traditional square root and fraction for all of these.

$Version

5.2 for Mac OS X (June 20, 2005)

Plot[x^2,{x,0,10},Epilog->
{Text[DisplayForm@ToBoxes[Sqrt[23]/4],{5,50}]}];

Plot[x^2,{x,0,10},Epilog->
{Text[Sqrt[23]/4,{5,50}]}];

Plot[x^2,{x,0,10},Epilog->
{Text[TraditionalForm[Sqrt[23]/4],{5,50}]}];


Bob Hanlon

bsye...@gmail.com

unread,
Sep 29, 2005, 5:54:55 AM9/29/05
to

Chris,
I tested your line of code on both windows XP and Linux (SUSE 9.3) with
Mathematica 5.2.
The graph looks as expected, the export is identical as well, so I see no
problem here
yehuda

David Park

unread,
Sep 29, 2005, 6:01:47 AM9/29/05
to
Chris,

Did you want this?

Plot[x^2, {x, 0, 10}, Epilog ->
{Text[HoldForm[Sqrt[23/16]], {5, 50}]}]

David Park
dj...@earthlink.net
http://home.earthlink.net/~djmp/

Bill Rowe

unread,
Sep 29, 2005, 6:16:33 AM9/29/05
to
On 9/28/05 at 1:40 AM, chris.c...@gmail.com (Chris Chiasson)
wrote:

>Plot[x^2,{x,0,10},Epilog->{Text[DisplayForm@ToBoxes[Sqrt[23]/4],{5,

>50}]}] How can I achieve the desired effect of the square root with


>the fraction inside the plot?

It isn't clear to me what you want. The Plot command you posted places the square root with the fraction centered at {5,50}. Since the plot extends from about {-.25,-2} to about {10.2, 103}, I would call where the square root is positioned as "inside the plot".
--
To reply via email subtract one hundred and four

Chris Chiasson

unread,
Sep 30, 2005, 3:58:34 AM9/30/05
to
To MathGroup Responders (thanks, btw):

My response is late because I reinstalled everything on my computer
since my last post... Nobody seems to have experienced the same
problem I had. I reproduced it again after the reinstall, though it
isn't as bad as it was before. The problem is that the fraction line
is broken. To prove to you that I am not (too) crazy, I put
screenshots on my website. The first one was taken before I changed
Windows' graphics settings around to see if that made a difference
(bit depth, performance options, etc):
http://chrischiasson.com/files/MMAGraphTextError1.png
http://chrischiasson.com/files/MMAGraphTextError2.png

What would cause this?

I have also seen it in some exported PDFs before...


On 9/29/05, David Park <dj...@earthlink.net> wrote:
> Chris,
>
> Did you want this?
>
> Plot[x^2, {x, 0, 10}, Epilog ->
> {Text[HoldForm[Sqrt[23/16]], {5, 50}]}]
>
> David Park
> dj...@earthlink.net
> http://home.earthlink.net/~djmp/
>
>
> From: Chris Chiasson [mailto:chris.c...@gmail.com]
>
>
> Dear MathGroup,

> Plot[x^2,{x,0,10},Epilog->{Text[DisplayForm@ToBoxes[Sqrt[23]/4],{5,50}]}]
> How can I achieve the desired effect of the square root with the
> fraction inside the plot?

Chris Chiasson

unread,
Sep 30, 2005, 4:04:40 AM9/30/05
to

Jens-Peer Kuska

unread,
Sep 30, 2005, 6:38:18 AM9/30/05
to
Hi,

have you try to print the plot ? and does the PostScript
output the same problem ?
This comes usual from the font metrics, that may be a bit
different for the Windows fonts (Times New Roman instead of Times, ..)
and this small differences cause that Mathematica "think"
the character is 9 pixel wide while the character in the Windows font
is only 8.8 pixel wide.

If I remember right, there is some where a performance switch for
Windows to use antialiasing for the true type fonts, and this should
reduce the effect.

Regards
Jens

"Chris Chiasson" <chris.c...@gmail.com>
schrieb im Newsbeitrag
news:dhir7a$lne$1...@smc.vnet.net...

Pratik Desai

unread,
Oct 1, 2005, 3:02:35 AM10/1/05
to
Chris Chiasson wrote:

I think the reason for this behaviour might be that Text uses
Outputform which is not probably as good as Standardform for text
rendering as it uses only " ordinary keyboard characters" whatever that
means (see help on OutputForm)


Hope this helps

Pratik .

--
Pratik Desai
Graduate Student
UMBC
Department of Mechanical Engineering
Phone: 410 455 8134


Chris Chiasson

unread,
Oct 4, 2005, 1:35:45 AM10/4/05
to
WRI sent an email about this, I have cut and pasted it below:

-- Wolfram Research Technical Support --

This is a response to your email.
The reply to your question can be found at the bottom of this message.
Our classification number for this message is: [TS 27967]
Please give this number in any future correspondence
related to this question. If you leave this number in
the Subject: header in the form [TS 27967], it will
automatically be reassigned to the original technician.

From: WRI Technical Support <sup...@wolfram.com>
Subject: re: MathGroup posting

ref: MathGroup posting
---------
http://forums.wolfram.com/mathgroup/archive/2005/Sep/msg00785.html

Re: Re: what is wrong with this plot?

Subject: what is wrong with this plot?

From: Chris Chiasson <chris.chiasson at gmail.com>
Reply-to: Chris Chiasson <chris.chiasson at gmail.com>

To MathGroup Responders (thanks, btw):

My response is late because I reinstalled everything on my computer
since my last post... Nobody seems to have experienced the same
problem I had. I reproduced it again after the reinstall, though it
isn't as bad as it was before. The problem is that the fraction line
is broken. To prove to you that I am not (too) crazy, I put
screenshots on my website. The first one was taken before I changed
Windows' graphics settings around to see if that made a difference
(bit depth, performance options, etc):
http://chrischiasson.com/files/MMAGraphTextError1.png
http://chrischiasson.com/files/MMAGraphTextError2.png

What would cause this?

I have also seen it in some exported PDFs before...

---------

----------------------------------------------------------------------------

Mr. Chiasson,

I found your note on MathGroup archive (above). I looked at
archives, so I do not know if an answer has been provided over
the weekend.

I duplicated the problem with Mathematica for Windows 5.0 and 5.2,
and Macintosh 5.0. On Macintosh version 5.2, the line was
continuous; this may be why some MathGroup responders did not
see it earlier. (Also, your earlier posts were not as clear as
to what problem you were asking about.)

The broken line may be an artifact of an old issue with PostScript
rendering. You seem to have found a good a workaround with
TraditionalForm. Corrections for PostScript-related problems are
being worked on; I do not have a schedule for when versions with
them will be released.


Bruce Miller
Technical Support
Wolfram Research, Inc.
sup...@wolfram.com
http://support.wolfram.com/


----------------------------------------------------------------------------

If this issue is resolved, please consider taking a few minutes
to give us some feedback on your experience. Please visit
http://support.wolfram.com/survey/?trackingnumber=27967
and give your honest answers to these three short questions.
Thanks for taking the time to help us improve.

On 9/30/05, Jens-Peer Kuska <ku...@informatik.uni-leipzig.de> wrote:
> Hi,
>
> have you try to print the plot ? and does the PostScript
> output the same problem ?
> This comes usual from the font metrics, that may be a bit
> different for the Windows fonts (Times New Roman instead of Times, ..)
> and this small differences cause that Mathematica "think"
> the character is 9 pixel wide while the character in the Windows font
> is only 8.8 pixel wide.
>
> If I remember right, there is some where a performance switch for
> Windows to use antialiasing for the true type fonts, and this should
> reduce the effect.
>
> Regards
> Jens
>
> "Chris Chiasson" <chris.c...@gmail.com>
> schrieb im Newsbeitrag
> news:dhir7a$lne$1...@smc.vnet.net...

0 new messages