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
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.
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
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
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
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:
Sjoerd,
thanks for getting to the bottom of this, your workaround really seems
to be fool-proof.
Jens