1

In this solution by @Mr.Wizard, some of the ticks along the bottom edge of the frame are clearly missing. This happens every time I use Charting`ScaledFrameTicks. Is there a fix?

For reference, here is the code and the output:

magic = Charting`ScaledFrameTicks[{# &, # &}];

Graphics[{} , Frame -> True , FrameTicks -> {{magic, All}, {magic, All}} ]

Output

Alex Bogatskiy
  • 1,680
  • 12
  • 19
  • 2
    Use Charting`ScaledFrameTicks[{Identity, Identity}] instead. – Carl Woll Jul 10 '23 at 17:19
  • @CarlWoll thanks, that fixed the missing ticks. But now I'm seeing another weird behavior. At least in the plot I'm currently making, it decided to draw major ticks at a different frequency on the edges that use Charting (bottom and right in my picture). Every fifth tick instead of everything fourth. https://imgur.com/bjZ84bU – Alex Bogatskiy Jul 10 '23 at 17:57
  • Can you provide an example that shows the issue? – Carl Woll Jul 10 '23 at 20:08
  • @CarlWoll took me some time to find a minimal example, but it suffices to just add PlotRange -> {{-Pi/4, Pi/4}, {-Pi/4, Pi/4}} to your example to get this https://imgur.com/a/4j9AGXa – Alex Bogatskiy Jul 12 '23 at 19:27
  • That's because the All/Automatic ticks are generated using different code from Charting`ScaledFrameTicks. One possibility is to use: Charting`ScaledFrameTicks[{Identity, Identity}][-Pi/4, Pi/4, {8, 4}] instead. Another possibiity is to use Charting`ScaledTicks[{Identity, Identity}] instead of All. – Carl Woll Jul 13 '23 at 14:31
  • @CarlWoll Amazing, thank you! – Alex Bogatskiy Jul 14 '23 at 23:08

0 Answers0