Message Boards Message Boards

PlotStyle -> Thickness functions differently on Mac vs Windows

Posted 8 years ago

PlotStyle -> Thickness work great on my Mac, but poorly on my Windows computer. On Windows, it "bottoms out" and cannot render anything thinner than 0.001 or so. Here's a comparison:

WINDOWS:

enter image description here

MAC:

enter image description here

We can see that the images get progressively thinner on the Mac (this is how I prefer it), but stay the same after a certain value on the Windows. I've tried both mathematica 9 and 10.3.1 on both systems with the same results. Is this a bug? Or something simpler... maybe a setting in Preferences? Notebook attached. Thanks.

Attachments:
POSTED BY: Bryan Lettner
10 Replies
Posted 8 years ago

My Lenovo T410S laptop running windows exhibits the same behavior:

enter image description here

Even if the ImageSize is increased to 1000 and the plot is exported, the very finest thickness of 0.0000001 = 1/10000000 still shows readable thickness.

enter image description here

I assume MMA for Windows is putting some floor on thickness, so as to always render a readable line.

POSTED BY: David Keith
Posted 8 years ago

Good to know. I guess the best workaround is to make ImageSize large enough to accommodate the fixed thickness.

POSTED BY: Bryan Lettner

Perhaps the cloud server version is exhibiting this issue because it is a Linux machine with a virtual "monitor" that has an effective dot pitch that is not up to par with the "retina" pitch of a MacBook...

POSTED BY: David Reiss

I've always used AbsoluteThickness to get a reliable thickness for printing purposes, I don't have access to a Windows machine to test, have you tried? And btw, sometimes there is a difference between right-clicking on a plot and save-as compared to Export["out.pdf",%]. What have you done in this case? For the best outcome always programmatically export.

POSTED BY: Sander Huisman

To give you an example:

data = Table[{x, 0.1 x}, {x, 100}];
ListPlot[data]
Export["export", %]

If you compare that to the 'manually' (rightclick save as) saved figures, you will see the thickness are completely different. See the attachments!

Also notice that in the manual version the datapoints are slightly rounded (for viewing purposes) the spacing are not the same!! So as a guide: NEVER use right-click save as to export!

Attachments:
POSTED BY: Sander Huisman
Posted 8 years ago

Thank you Sander. Yes, I always use Export to save. I tried AbsoluteThickness, but it also gives the same problem. Could be something with my particular computer. Maybe someone with a windows machine can try to duplicate?

POSTED BY: Bryan Lettner

I'm not sure how the export works but it might use libraries from the operating system, explaining the difference between OSs... There must be someone else with Windows, somewhere!

POSTED BY: Sander Huisman

Hi,

I couldn't find anyone with a Windows machine either, which is strange given that I am at a university. The computer classrooms should have Windows...

Anyway, I cannot reproduce the problem on a Mac, but if you run the code on the Wolfram Cloud server it shows the same symptoms described here for the windows machine. For the Cloud we get:

enter image description here

Cheers,

Marco

POSTED BY: Marco Thiel

This most likely has to do with the dot pitch on your particular computer's screen. For example one can watch the thickness make the plot "disappear" on either computer by changing it in a Manipulate:

Manipulate[
 Plot[x, {x, 1, 2}, PlotStyle -> Thickness[1/x]],
 {x, 10, 10000}]

On my MacbookPro the line becomes essentially invisible at around 1/9000...

POSTED BY: David Reiss
Posted 8 years ago

Interesting... but I'm using the same monitor for both computers. Both are desktops. And when I use Export, it exports the same plot displayed in Mathematica (thicker than it should be).

POSTED BY: Bryan Lettner
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