Group Abstract Group Abstract

Message Boards Message Boards

1
|
21.7K Views
|
5 Replies
|
8 Total Likes
View groups...
Share
Share this post:

PlotMarkers, Epilog and Inset: new features and new bug?

Posted 11 years ago

Version: Mathematica 10.0.2.0, Platform: Mac OS X 10.9.5 x86

I see Mathematica 10.0.2 uses GeometricTransformation to render PlotMarkers. This is an improvement, as the impreciseness of the old PlotMarkers has been a major pain for high quality data visualization. But there seems to be a bug when working together with Epilog and Insets. Consider the following code:

ListPlot[Table[n^(1/p), {p, 4}, {n, 10}], PlotMarkers -> Automatic,
 Epilog -> {
   Inset[Graphics[{Red, Text[Style["text one", 16]]}], {1.5, 5.5}],
   Inset[Graphics[{Green, Text[Style["text two", 16]]}], {8, 5.5}]
   },
 PlotLabel -> $Version,
 ImageSize -> Medium
 ]

Screenshots:

fig1 fig2 fig3

Here I insert two texts in the figure using Epilog and Inset. Instead of getting a red "text one" and a green "text two", I get two red "text one" (Fig. [1]). The correct result is produced if I remove PlotMarkers -> Automatic (Fig. [2]), or evaluate it in Mathematica 9.0.0.0 (Fig. [3]).

The problem is clear in the full form. Without the presence of PlotMarkers, Mathematica 10.0.2.0 parses Epilog as usual:

Rule[Epilog, 
 List[Inset[
   Graphics[List[RGBColor[1, 0, 0], Text[Style["texts one", 16]]]], 
   List[1.5`, 5.5`]], 
  Inset[Graphics[
    List[RGBColor[0, 1, 0], Text[Style["texts two", 16]]]], 
   List[8, 5.5`]]]]

With the presence of PlotMarkers, Mathematica 10.0.2.0 uses GeometricTransformation to render the insets along with the plot markers. However, it seems Mathematica 10.0.2.0 failed to parse two insets given by Epilog correctly.

Rule[Epilog, 
 List[GeometricTransformation[
   Inset[Graphics[
     List[RGBColor[1, 0, 0], Text[Style["text one", 16]]]], 
    List[0.`, 0.`]], 
   List[List[List[1.5`, 5.5`]], List[List[8, 5.5`]]]]]]

I think this is a bug.

POSTED BY: Yang Li
5 Replies
POSTED BY: Andre Koppel

Yes, this is a bug. You can work around it with Method -> {"OptimizePlotMarkers" -> False}.

(I encourage you to send bugs directly to support (*) to make sure they're properly tracked. You'll also be notified when they are fixed.)

* http://www.wolfram.com/support/contact/email/?topic=Technical

POSTED BY: Brett Champion

Hi Brett,

Where can I find this in the help? There seem to be more and more 'hidden' settings in newer and newer releases, i'd wish there to be a way to know them all!

--SH

POSTED BY: Sander Huisman

Hi Sander, yes, Mathematica documentation used to be good, but not any more when it comes to details like this one. I wished there would be a release without any new functionality. Just old (very very old) bugs fixed and the documentation improved for the serious programmers.

POSTED BY: Rolf Mertig

The documentation is pretty good actually, I'm just very surprised that sometimes one of the wolfram employees come up with a solution that is based on some method or secret 'setting' to get things going.

It is definitely better than the competitors: matlab and maple...

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard