2
$\begingroup$

Here's an example of a Graphics that has some modest decoration.

lp=ListLinePlot[Callout[{1, 3, 4, 6}, "trend"], PlotMarkers -> Automatic]

I can wrap Dataset around the Graphics expression without any visual simplification of the plot.

Dataset[lp]

But if I make the Graphics a value to an Association and wrap that up in Dataset, the FrontEnd simplifies presentation of the plot.

Dataset[Association["a"->lp]]

I agree that this heuristic makes a lot of sense. But what if in a particular case, I want to see the plot in all its glory. How do I do it? I've tried various trickery such as Rasterizing the Graphics object or fiddling with Dataset`$ElisionThreshold and I've read this post Dataset's visual appearance is inconsistent, but to no avail. It either doesn't work or it doesn't really make the presentation any better.

Any ideas?

$\endgroup$
1
  • $\begingroup$ The plot itself is not modified though, only its presentation. If you retrieve the plot from your second dataset (Dataset[Association["a" -> lp]]["a"]), it will still have all those features. But do you mean that you want the graphical representation of the plot in the Dataset framework to be the same as the plot itself? $\endgroup$
    – MarcoB
    Jul 1, 2022 at 20:07

1 Answer 1

5
$\begingroup$

If the issue is the display of the Dataset, you can use an ItemDisplayFunction.

Dataset[Association["a" -> lp, "b" -> lp], 
 ItemDisplayFunction -> "b" -> {# &}]

enter image description here

$\endgroup$
1
  • $\begingroup$ Perfect. Thanks! $\endgroup$ Jul 2, 2022 at 23:27

Your Answer

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

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