6
$\begingroup$

Bug introduced in 12.3 and fixed in 13.0

After finding out that in 12.3 two new optional arguments have been added to Dashing, I decided to have a look at them. Unfortuantely, I don't understand the way the offset argument works. The documentation has an example

Table[Graphics[{Line[{{0, 0}, {2, 1}}], Dashing[{.1, .05}, o], Red, 
   Opacity[.5], Thickness[.05], Line[{{0, 0}, {2, 1}}]}], {o, {-0.05, 
   0, 0.05}}]

which for me gives a slightly different output than what is in the documentation, namely I get

Mathematica graphics

The difference is that for me all the lines start at the bottom left corner with a dash, whereas in the documentation the first line starts with a gap, the second with a dash, and the final one from the middle of a dash.

Also, changing o to

{-0.15, 0, 0.15}

at the end of the command (or to other values) does not change anything for me. I am not going to post more images, as it literally looks exactly the same as the one above.

The documentation explains offset as:

"offset is specified as a fraction of the total width of the graph, and it may be positive or negative. If offset is not specified, it is 0."

Based on that I played with the Thickness parameter in the command, thinking that this affects the width of the dashes, but that only led to the latter becomming thicker and varying offset did not produce any visible changes.

I am on Mathematica 12.3.1, on Ubuntu 20.04.

What is offset supposed to do and how do I use it?

UPDATE: Would it be possible for somebody to confirm whether this also happens on Mac OS or Windows, thank you.

$\endgroup$
11
  • $\begingroup$ Trying this in 12.3.0 on Pop!_OS, it appears this is a bug. The final example in the documentation is an animation of varying offset that doesn't actually do anything. Animate[Graphics[{Dashing[{.04, .04}, a], Table[Line[{{0, 0}, {Cos[b], Sin[b]}}], {b, 0, 2 \[Pi], \[Pi]/20}]}], {a, 0.64, 0}] $\endgroup$
    – Carl Lange
    Sep 1, 2021 at 10:17
  • 1
    $\begingroup$ @ThunderBiggi, why don't you edit your question to add a request for people to check if the bug is reproducible on different platforms? I have reported bugs or other problems to Wolfram Support with links to Mathematica StackExchange and it's clear that they do look at the information we share here seriously. You do have to report to support though and share with them the link to the Q&A. $\endgroup$
    – rhermans
    Sep 1, 2021 at 11:47
  • 4
    $\begingroup$ The wonkiness with offset is a bug on Linux. It will behave better in the next version. $\endgroup$
    – ihojnicki
    Sep 1, 2021 at 11:51
  • 3
    $\begingroup$ @ihojnicki Could you elaborate on how you know this? $\endgroup$
    – Carl Lange
    Sep 1, 2021 at 12:09
  • 3
    $\begingroup$ @CarlLange, I reviewed the changeset that fixed it. :) $\endgroup$
    – ihojnicki
    Sep 1, 2021 at 13:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.