Suppose I first create a graphic, e.g.:

data = Min[#, 100] & /@ RandomVariate[NormalDistribution[70, 10], 60];
graf = Histogram[data, 10, "ProbabilityDensity"]

Next, I have a URL, e.g.:

 url = "https://blog.wolfram.com";

How can I "embed" that URL as a hyperlink in the graphic and then export the graphic — as a pdf or png — with the embedded hyperlink, so that if I view the exported image in a browser and click it, I will be directed to the indicated URL?

(The intention is to include that graphic in a web page, so that clicking it will go to the URL of the hyperlink.)

  • 1
    $\begingroup$ You can possibly include information in a png, but to force other applications to treat it as a link? Impossible. Why not use HTML to make it a link? <a href="..."><img src="..."></a> $\endgroup$ – C. E. Jan 19 '19 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.