8
$\begingroup$

Bug introduced in 10.4 and fixed in 11.1
This problem is specific to OS X


It appears on my system (OSX 10.10.5) that CapForm isn't behaving itself in V11. Initially I thought it was a problem with the combination of CapForm and VertexColors but it seems even weirder than that!

For demonstration consider the four combinations of either CapForm[Automatic] or CapForm["Round"] with either no vertex colors or VertexColors->{Red,Green}:

t = Thickness[0.2];    
pr = PlotRange -> {{-0.2, 1.2}, {-0.2, 0.2}};

GraphicsGrid[{{
   Graphics[{CapForm[Automatic], t, Line[{{0, 0}, {1, 0}}]}, pr],
   Graphics[{CapForm[Automatic], t, Line[{{0, 0}, {1, 0}}, VertexColors -> {Red, Green}]}, pr]
 }, {
   Graphics[{CapForm["Round"], t, Line[{{0, 0}, {1, 0}}]}, pr],
   Graphics[{CapForm["Round"], t, Line[{{0, 0}, {1, 0}}, VertexColors -> {Red, Green}]}, pr]
 }}
]

V10.3

enter image description here

V11

enter image description here

As you can see, the rounded caps are not produced in V11.

However, perhaps even more bizarrely, if I run the third entry (rounded ends, no vertex colors) on it's own outside of GraphicsGrid it works fine:

Graphics[{t, CapForm["Round"], Line[{{0, 0}, {1, 0}}]}, pr]

V11

enter image description here

Bugged?

Addendum

Perhaps a hint at the origin of this oddity is that when exported to a vector graphics format the rounded ends reappear! Although the vertex coloring is mutilated as in past versions:

line = Graphics[{CapForm["Round"], t, Line[{{0, 0}, {1, 0}}, VertexColors -> {Red, Green}]}, pr];
Export["~/Desktop/img31.pdf", %]

enter image description here

$\endgroup$
  • 1
    $\begingroup$ Works fine in V11 on Win 7 Ent SP1 $\endgroup$ – Edmund Aug 23 '16 at 11:44
  • 1
    $\begingroup$ I can confirm this behavior (Mathematica 11.0.0.0 on OS X 10.11.6) $\endgroup$ – Sascha Aug 23 '16 at 11:49
  • $\begingroup$ Looks like this image $\endgroup$ – Edmund Aug 23 '16 at 11:50
  • $\begingroup$ Did you already report this to support@wolfram.com? $\endgroup$ – Searke Aug 23 '16 at 15:27
4
$\begingroup$

On 11.1 on mac osx.

t = Thickness[0.2];
pr = PlotRange -> {{-0.2, 1.2}, {-0.2, 0.2}};

GraphicsGrid[{
 {Graphics[{CapForm[Automatic], t, Line[{{0, 0}, {1, 0}}]}, pr], 
  Graphics[{CapForm[Automatic], t, 
   Line[{{0, 0}, {1, 0}}, VertexColors -> {Red, Green}]}, pr]}, 
 {Graphics[{CapForm["Round"], t, Line[{{0, 0}, {1, 0}}]}, pr], 
 Graphics[{CapForm["Round"], t, 
  Line[{{0, 0}, {1, 0}}, VertexColors -> {Red, Green}]}, pr]}}]

enter image description here

$\endgroup$
  • $\begingroup$ It's fixed! Yay! Thanks for checking and updating us. $\endgroup$ – Quantum_Oli Apr 4 '17 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.