5
$\begingroup$

When I try to plot a set of graphs using ListPlot with PlotLayout->{"Row", 4}, and then try to label the plots using PlotLabels, the label appears above and the plot range is increased to accommodate the label. I try to use the PlotLabels -> Placed[labels, Scaled[{0.8, 0.8}]], but this produces a single label for the first plot that is "Placed[labels, Scaled[{0.8, 0.8}]]". Does anyone know whether this is a bug? Is there a workaround?

d = Table[RandomReal[1, {10, 2}], 8];
ListPlot[d, PlotLayout -> {"Row", 4}, PlotLabels -> Range[10]]

enter image description here

However, this gives an unexpected result:

ListPlot[d, PlotLayout -> {"Row", 4}, PlotLabels -> Placed[Range[10], Scaled[{.8, .8}]]]

enter image description here

I would like to be able to use Placed to move the labels within the plots.

$\endgroup$
  • $\begingroup$ Hi, welcome to the Mathematica Stack Exchange! In general, your question looks good, but please consider adding specific code to reproduce your issue to your question - some code any person can run that will display your problem. This is called a Minimum Working Example, or MWE, and will greatly help your chances of getting a useful answer! It might also be useful to add a screenshot of your issue, and a description of what you were expecting to happen. $\endgroup$ – Carl Lange May 9 '19 at 10:14
  • $\begingroup$ I have added code and screenshots of what I think you are describing to your question - I hope that's correct! It does seem like odd behaviour. $\endgroup$ – Carl Lange May 9 '19 at 10:21
  • $\begingroup$ @Carl Lange: Thanks for adding an example and for verifying this odd "feature". $\endgroup$ – Andrei Alexandru May 9 '19 at 11:19
  • 1
    $\begingroup$ No problem, happy to help. It seems like the labels are done using Inset when you use this form, and that may be part of the problem (you can see this using InputForm of the plots). I don't really know what to do with this, unfortunately! $\endgroup$ – Carl Lange May 9 '19 at 11:26

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.