4
$\begingroup$

I am trying to make a 6 panel figure for publication where each X and Y axis has its own label. Here is simplified code and its output:

Get["SciDraw`"]
Figure[
 Multipanel[{

   (*FIGURES HERE*)
   FigurePanel[{ },{1, 1}];

   },

  (**)
  Dimensions -> {2, 3},

  (*AXIS STUFF HERE*)
  XPlotRange -> {0, 1},
  YPlotRange -> {0, 1},
  YFrameLabel -> {
    {"y label 1", "y label 2", "y label 3"},
    {"y label 4", "y label 5", "y label 6"}
    },
  XPanelGaps -> 0.5,
  YPanelGaps -> 0.5
  ],
 Background -> White,
 CanvasSize -> {10, 5}
 ]

Should have y labels 1 through 6 in order with the letters

So my question is how do I get different X/Y axes on each panel?

$\endgroup$
4
$\begingroup$

Use ShowFrameLabel -> True. You may also want to use ShowTickLabels -> True. The options have the usual variants, i.e. XShowFrameLabel, XXShowFrameLabel, etc.


Figure[
 Multipanel[
  {
   FigurePanel[{}, {1, 1}, FrameLabel -> {"foo", "bar"}];

   FigurePanel[{}, {2, 1}, 
    FrameLabel -> {"rabbit", "dog"}, 
    ShowTickLabels -> False (* in this panel we don't want tick labels *)
   ];

   FigurePanel[{}, {1, 2}, 
    FrameLabel -> {"macaw", "jaguar"}, 
    ShowFrameLabel -> False (* in this panel we don't want fame labels *)
   ];

   FigurePanel[{}, {2, 2}, FrameLabel -> {"wombat", "thylacine"}];
   },
  Dimensions -> {2, 2},
  XPanelGaps -> 0.2, YPanelGaps -> 0.2,
  ShowFrameLabel -> True, (* by default we want all frame labels, not just on the edges *)
  ShowTickLabels -> True (* by default we want all tick labels, not just on the edges *)
  ],
 CanvasSize -> {8, 6}
 ]

Mathematica graphics

$\endgroup$
  • $\begingroup$ So in the case of a 2x3 panel figure, is the default with Multipanel XShowFrameLable -> {{False,False,False},{True,True,True}} and YShowFrameLable -> {{True,False,False},{True,False,False}}? Looking through the user guide documentation, I don't see any mention of that. $\endgroup$ – Eric Feb 17 '16 at 22:38
  • $\begingroup$ @Eric I don't know the details of how these options are handled. I never use this syntax that you show. I either use a global setting in Multipanel, where the default is ShowFrameLabel -> False and causes the result you showed, or otherwise I put the options within FigurePanels directly. That way I know what option is associated with what panel, even if I change the panel arrangement. I never use lists of boolean values directly within Multipanel. $\endgroup$ – Szabolcs Feb 18 '16 at 9:20
  • $\begingroup$ maybe I'm misinterpreting what you're saying, but I saw somewhere in the documentation that figurepanels within multipanels will only use XYoptions specified from multipanel. Is it that they will preferentially apply multipanel options over figurepanel options? $\endgroup$ – Eric Feb 18 '16 at 14:23
  • $\begingroup$ @Eric I don't know. I added an example. $\endgroup$ – Szabolcs Feb 18 '16 at 14:42
  • $\begingroup$ Excuse me!You code cannot be run in 10.3.1? $\endgroup$ – yode Feb 19 '16 at 13:56

Your Answer

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

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