Message Boards Message Boards

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

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

Posted 10 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

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

Sometimes (often if you are writing a cloud appliation) there are strange errors or some kind of functionality simply did not work. As an old and experienced programmer I have no problem if there are errors within a product. It's simply the normal case. But what I am missing is a bug list (possibly with suggestions to get around the problem). Such a list would save hours of searching for a problem. Without a bug list you will try hundreds of steps to find a solution (or to find the real reason for the problem) often without success. So like Rolf, on top of my wish list is a product without new features but with old problems solved and a buglist. By the way. What's the meaning of a missing buglist? It didn't mean "there are no bugs" but it really means either "we have no idea about the bugs because we did not have a fully functional tracking system" or it means "we are not willing to help our customers". I know, this is an incisive wording, but our customers would kill us if we would do it the same way. Possibly this is because most of our customers are lawyers and such customers are very intolerant to failures. This is different if a customer is a technican...

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

Group Abstract Group Abstract