I would like to adapt the following instructions How to create a Hyperlink within the current Notebook? to have a hyperlink to an output of a simple plot such as


How to deal with the fact that the target is not a text but a graphics?


1 Answer 1


The following syntax works:

   BoxData[ToBoxes[Plot[Sin[x], {x, -2, 2}]]],
   CellTags -> {"target"}]

It is documented under Cell -> Scope.

Hyperlink["link", {EvaluationNotebook[], "target"}]
(* Out: hyperlink pointing to the plot *)

MichaelE2 points out in a comment that ExpressionCell can be used:

Plot[Sin[x], {x, -2, 2}], "Output", CellTags -> "tag"

Note that you can also add tags manually through the drop down menu that you get by right-clicking on cells:

How to add tags

  • 1
    $\begingroup$ I have noticed that when I close my notebook I lose all the Cell Tags added manually from the drop down menu. Is there any way to leave them permanent? $\endgroup$
    – Andrea G
    May 22, 2017 at 14:28
  • $\begingroup$ @AndreaG did you save the notebook after adding cell tags? Works fine on Win7 V11.1.1 $\endgroup$
    – Kuba
    May 22, 2017 at 15:19
  • $\begingroup$ @Kuba I was pretty sure to have done it. However, I just redid it and it worked. I may have done some mistake. If I notice something weird next time I open the notebook I will let you know $\endgroup$
    – Andrea G
    May 22, 2017 at 16:37
  • 1
    $\begingroup$ One can use ExpressionCell and skip the box stuff: CellPrint@ExpressionCell[Plot[Sin[x], {x, -2, 2}], "Output", CellTags -> "tag"] $\endgroup$
    – Michael E2
    May 22, 2017 at 17:30

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.