0

The code below builds a circular diagram. There is no arrow from 11 to 0. This is intentional. However, I need the "0" node in the 12 o’clock position. Reordering the numbers in the \smartdiagram command rotates the nodes but removes the wrong arrow. The diagram must behave like a Ferris wheel---the bottoms of rectangular nodes should remain horizontal---so rotating the entire diagram will not work.

    \documentclass[]{standalone}
    \usepackage{smartdiagram}
    \smartdiagramset{circular distance=7.5cm,
    circular final arrow disabled=true,
    uniform color list=gray for 12 items,
    arrow tip=to,}
    \usepackage{tikzpagenodes}
    \begin{document}
    \smartdiagram[circular diagram:clockwise]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}%
    \end{document}

enter image description here

4
  • 1
    Please remove the boldface unless it's needed on rare occasions: this way it's unpleasant to read. // I suggest including a screenshot, may be also with some sketch or visual indication of your verbal description. // Would also be nice, if you did some indention on the code. Thanks
    – MS-SPO
    Commented Aug 11, 2021 at 14:35
  • Well, what I can tell you from having a look at how this is implemented, the problem is that the angle that defines the position of each of the nodes is defined as 180+360/\maxsmitem*\xi where \maxsitem is the number of items and \xi is each individual item. That causes the position of the LAST element to always be at 180, while the first element shifts according to the number of items. It don't see how you could solve that other than redefining it in the package code...
    – Markus G.
    Commented Aug 11, 2021 at 15:18
  • It can be done using TikZ. For a reference here tex.stackexchange.com/questions/511183/…
    – Black Mild
    Commented Aug 11, 2021 at 16:39
  • 1
    Does this answer your question? Simple way to make circular arrow arc? Commented Aug 11, 2021 at 17:30

1 Answer 1

2

So, as I explained in my comment above, your problem here is the definition of the angle that in turn defines the node position. To make sure, your first element is in the 12 o'clock position, you'll have to redefine the package code a bit. Since it is not advisable to do this in the actual package that is managed by your package manager here is what you can do: Find the package files of the smartdiagram package. Copy and paste them into the directory of your .tex file. Open smartdiagramlibrarycore.commands.code.tex in your files' directory (not the original one) and change line 36 to \pgfmathtruncatemacro{\angle}{270+360/\maxsmitem*(\xi-1)}.

This will ensure that the angle of the first element is 90° i.e. 12 o'clock.

Not very elegant, but it gets the job done.enter image description here

1
  • Maybe the package owner @Claudio Fiandrino can comment on wether this type of functionality already exists in the package and I just missed it.
    – Markus G.
    Commented Aug 11, 2021 at 17:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .