# Problem with thickness in 3D plots

I'm facing a problem with Mathematica 11.1.1 on MacOS (2016 Macbook Pro). The Thickness and AbsoluteThickness options in PlotStyle do not scale consistently. There is a "jump" around the value AbsoluteThickness[3] (for Thickness the value depends on the image size).

ParametricPlot3D[{{Cos[t], Sin[t], .2}, {Cos[t], Sin[t], -.2}}, {t, 0, 10},
PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}},
PlotStyle -> {AbsoluteThickness[3.00001], AbsoluteThickness[3.]}]


The problem is visible in the notebook and also in files exported with the command Export, independently of the type (vector PDF, PNG,...) and or resolution (see image below).

This is a regression, because I have notebooks written in version 10 that do not have the problem, but the problem occurs if I reevaluate them with this version. I can't say if the problem was introduced in v11 or in a successive release. The problem is not there on a Ubuntu setup with Mathematica 11.1.1.

Can anyone reproduce this?

• I have MMA 11.1.0.0 on Windows 8.1 and is OK. :) Jul 31, 2017 at 9:44
• Use AbsoluteThickness[] if you want thickness that is independent of image size. (Pay special attention to the second sentence of Thickness[]'s usage message.) Also, please don't use the bugs tag until your observations have been confirmed by other users. Jul 31, 2017 at 9:59
• Your code works fine on MMA 10.4 on Win10. Jul 31, 2017 at 10:48
• @J.M. the problem is the same with AbsoluteThickness around the value of 3. Now, as you correctly point out, it is independent of the image size. I edited the question. Jul 31, 2017 at 13:42

It turns out that Dashed does not suffer from this problem. A temporary fix is to use a dashed line with ridiculously large length for the dash:

ParametricPlot3D[{{Cos[t],Sin[t],.2},{Cos[t],Sin[t],-.2}},
{t,0,10},PlotRange->{{-1,1},{-1,1},{-1,1}},PlotStyle->
{AbsoluteThickness[3.00001],
{AbsoluteDashing[{1000,0}],AbsoluteThickness[3.]}}
]


• (+1) Nice find! Jan 12, 2018 at 13:02
• It's nice that we find workarounds for this but I believe that people at Wolfram should address this since it clearly is a bug on the Mac platform Jan 12, 2018 at 17:28
• Wolfram has a link for reporting bugs: wolfram.com/support/contact/email, I suggest that you send them a note. Jan 12, 2018 at 20:11
• @Pincopallino I have an idea it's a design choice and not a bug; and if my idea is correct, it makes sense - albeit in hindsight - that dashing appears to be a workaround, since dashing would invoke a general line-drawing algorithm instead of an optimized, undashed, single-pixel-width one. I do think there should be an option to turn the threshold on or off. Jan 13, 2018 at 3:37
• My view is it's a bug. Not only is it undocumented (it cost me days of trial and error), but as @Mariusz said, the problem does not show up in Windows. Jan 13, 2018 at 11:08

I can, but to a less severe extent. Mathematica 11.0.1, on Mid 2015 Macbook Pro (15" retina display with standard resolution) with macos 10.12.6

And the new code with AbsoluteThickness

ParametricPlot3D[{{Cos[t], Sin[t], .2}, {Cos[t], Sin[t], -.2}}, {t, 0,   10},
PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}},
PlotStyle -> {AbsoluteThickness[3.00001], AbsoluteThickness[3.]}
]


produces

• What mac do you have? What is the resolution of the screen? Also, can you try with the new code in the question, which uses AbsoluteThickness instead of Thicnkess? Jul 31, 2017 at 15:10

I get the same problem on my Mac:

\$Version
(*  "11.2.0 for Mac OS X x86 (64-bit) (September 11, 2017)"  *)


It's a Graphics3D issue. The discontinuity also happens with Thickness[], but the cutoff changes with the width of the image. I think it's an optimization, and at the cutoff, rendering switches from a fast, pixel-width routine to one that calculates thickness. But that's just a guess.

There is a setting that gives a more continuous variation in thickness, but at a cost. See RenderingOptions:

{
thickness = 2.5;
plot = ParametricPlot3D[{Sin[u], Cos[u], u/10}, {u, 0, 20},
PlotStyle -> AbsoluteThickness[thickness], ImageSize -> 300];
Style[plot, RenderingOptions -> {"3DRenderingEngine" -> "Mesa"}],
thickness = 3.;
plot = ParametricPlot3D[{Sin[u], Cos[u], u/10}, {u, 0, 20},
PlotStyle -> AbsoluteThickness[thickness], ImageSize -> 300];
Style[plot, RenderingOptions -> {"3DRenderingEngine" -> "Mesa"}]
}


I see a difference in thickness (you can adjust thickness as desired), but it also looks to me that some paint has flaked off.