Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Graphics in PlotMarkers buggy in Mathematica 7
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
JUN  
View profile  
 More options Jan 12 2009, 8:15 pm
Newsgroups: comp.soft-sys.math.mathematica
From: JUN <noec...@gmail.com>
Date: Tue, 13 Jan 2009 01:15:47 +0000 (UTC)
Local: Mon, Jan 12 2009 8:15 pm
Subject: Graphics in PlotMarkers buggy in Mathematica 7
Hi,
in Mathematica 7 on Mac OS X, try to execute this simple example:

ListPlot[{{{1, 1}}, {{1, 2}}}, PlotMarkers -> {Graphics[{Hue[0.5],
Circle[]}], Graphics[{Hue[0.96],Circle[]}]}]

Whereas this works in Mathematica 6.03, there is now the error
"An improperly formatted option was encountered while reading a
GraphicsBox. The option was not in the form of a rule."

This is apparently caused by any graphics directive (such as Hue,
Opacity, Thickness), but I was able to reliably work around it by
replacing Graphics with HoldForm@Graphics.

There seems to be no problem with Graphics3D markers, and according to
the documentation there should be no problem with arbitrary Graphics
as plot markers, either. I'm guessing there has been some subtle
change in Graphics' inner workings that conflicts with its use in
PlotMarkers - but who knows.

Anyway, HoldForm is the cure, in case anyone else stumbles over this
issue.

Cheers,
Jens


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Syd Geraghty  
View profile  
 More options Jan 12 2009, 10:14 pm
Newsgroups: comp.soft-sys.math.mathematica
From: Syd Geraghty <sydgerag...@me.com>
Date: Tue, 13 Jan 2009 03:14:58 +0000 (UTC)
Local: Mon, Jan 12 2009 10:14 pm
Subject: Re: Graphics in PlotMarkers buggy in Mathematica 7
Jens,

The workaround you suggested has a problem if the PlotMarker Circle[]  
is altered to a different radius.

ListPlot[{{{1, 1}}, {{1, 2}}},
  PlotMarkers -> {HoldForm@Graphics[{Hue[0.5], Circle[{1, 1}, 0.01]}],
    HoldForm@Graphics[{Hue[0.96], Circle[{1, 2}, 2]}]}]

Does not change the PlotMarker circle radius at all in either case.

This seems like a bug and I have reported it to WRI.

Syd Geraghty B.Sc, M.Sc.

sydgerag...@mac.com

Mathematica 7.0.0 for Mac OS X x86 (64 - bit) (21st November, 2008)
MacOS X V 10.5.6
MacBook Pro 2.33 GHz Intel Core 2 Duo  2GB RAM

On Jan 12, 2009, at 3:24 AM, JUN wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JUN  
View profile  
 More options Jan 13 2009, 7:02 am
Newsgroups: comp.soft-sys.math.mathematica
From: JUN <noec...@gmail.com>
Date: Tue, 13 Jan 2009 12:02:51 +0000 (UTC)
Local: Tues, Jan 13 2009 7:02 am
Subject: Re: Graphics in PlotMarkers buggy in Mathematica 7
On Jan 12, 7:14 pm, Syd Geraghty <sydgerag...@me.com> wrote:

> Jens,

> The workaround you suggested has a problem if the PlotMarker Circle[]
> is altered to a different radius.

> ListPlot[{{{1, 1}}, {{1, 2}}},
>   PlotMarkers -> {HoldForm@Graphics[{Hue[0.5], Circle[{1, 1}, 0.01]}],
>     HoldForm@Graphics[{Hue[0.96], Circle[{1, 2}, 2]}]}]

> Does not change the PlotMarker circle radius at all in either case.

Syd,
although your example isn't quite correct, you do have a point!

Your example doesn't work even in Mathematica 6 where the bug is
absent: the documentation says we should be able to set the scale s of
a graphics object g by specifying {g, s} in PlotMarkers. But if I try
this in my example with HoldForm applied to Graphics, it doesn't
work.

What does work, though, is to specify the size s of the circle as
Circle[{0,0}, Scaled[s]]. This works in Mathematica 6 and 7, with or
without HoldForm. For text, you can also put in things like Style
["A",Larger] etc.

I did report the bug, too. A working ListPlot would be nice, wouldn't
it?

Jens


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sjoerd C. de Vries  
View profile  
 More options Jan 14 2009, 5:36 am
Newsgroups: comp.soft-sys.math.mathematica
From: "Sjoerd C. de Vries" <sjoerd.c.devr...@gmail.com>
Date: Wed, 14 Jan 2009 10:36:36 +0000 (UTC)
Local: Wed, Jan 14 2009 5:36 am
Subject: Re: Graphics in PlotMarkers buggy in Mathematica 7
Looks like a genuine bug. The part of the graphics code that place the
circles in Mathematica 7 is (using FullForm):

Inset[Graphics[List[Hue[0.5]], Circle[List[0, 0]]], 6]]

whereas in Mathematica 6 it is (looks the same, but it's subtilly different):

Inset[Graphics[List[Hue[0.5], Circle[List[0, 0]]]], 6]]

Clearly, in Mathematica 7 the outmost List does not wrap around all graphics
primitives as it does in Mathematica 6, but only around the first one. The
closing bracket is misplaced. This leaves the latter primitives
bungling.

Cheers -- Sjoerd

On Jan 13, 3:15 am, JUN <noec...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sjoerd C. de Vries  
View profile  
 More options Jan 14 2009, 5:36 am
Newsgroups: comp.soft-sys.math.mathematica
From: "Sjoerd C. de Vries" <sjoerd.c.devr...@gmail.com>
Date: Wed, 14 Jan 2009 10:36:58 +0000 (UTC)
Local: Wed, Jan 14 2009 5:36 am
Subject: Re: Graphics in PlotMarkers buggy in Mathematica 7
Another workaround would be placing each marker between curly
brackets. As in:

ListPlot[{{{1, 1}}, {{1, 2}}},
 PlotMarkers -> {{Graphics[{Hue[0.5],
      Circle[]}]}, {Graphics[{Hue[0.96], Circle[]}]}}]

Cheers -- Sjoerd

On Jan 13, 3:15 am, JUN <noec...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JUN  
View profile  
 More options Jan 15 2009, 6:09 am
Newsgroups: comp.soft-sys.math.mathematica
From: JUN <noec...@gmail.com>
Date: Thu, 15 Jan 2009 11:09:59 +0000 (UTC)
Local: Thurs, Jan 15 2009 6:09 am
Subject: Re: Graphics in PlotMarkers buggy in Mathematica 7
On Jan 14, 2:36 am, "Sjoerd C. de Vries" <sjoerd.c.devr...@gmail.com>
wrote:

Sjoerd,
thanks for getting to the bottom of this, your workaround really seems
to be fool-proof.

Jens


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »