0
$\begingroup$

I have several figures like the one in the below:

logdata001 = {{2., 0.961973}, {3., Around[1.0615567283096428`, 0.0829973108613199]}, {4., Around[1.6148368066515686`, 0.19646949168300437`]}, {4.9542, Around[1.9799984788912215`, 0.22744045238090516`]}, {5.97728, Around[3.0256586135432313`, 0.4441779651996193]}, {6.96578, Around[4.751870201707909, 0.5186565213910944]}, {7.96578, Around[8.353662042037488, 1.0279834833435684`]}, {8.96578, Around[13.333103260464355`, 1.3421587275991116`]}}

logdata002 = {{2., 1.36736}, {3., 1.50511}, {4., 1.67348}, {4.9542, 2.25512}, {5.97728, 3.0625}, {6.96578, 4.38542}, {7.96578, 7.34536}, {8.96578, 12.6508}}


ListLinePlot[{logdata002, logdata001}, IntervalMarkers -> "Fences", Frame -> True, 
PlotMarkers -> {Graphics[{Disk[], {Thick, Circle[]}}], 0.04}, LabelStyle -> {22, GrayLevel[0]}, 
PlotStyle -> {{RGBColor[0.368417, 0.506779, 0.709798], Thick}, {RGBColor[0.922526, 0.385626, 0.209179], Thick}}, ImageSize -> Large, BaseStyle -> {FontFamily -> "Latin Modern Math"},
PlotLegends -> Placed[PointLegend[{Style["Theory", 
FontFamily -> "Latin Modern Roman 10"], 
Style["Experiment", FontFamily -> "Latin Modern Roman 10"]}, 
LegendFunction -> "Frame"], Scaled[{0.2, 0.77}]], 
FrameLabel -> {Style["City", FontFamily -> "Latin Modern Roman 10"], 
Style["Crimes", FontFamily -> "Latin Modern Roman 10"]}, FrameTicks -> {{{2, 4, 6, 8, 10, 12, 14}, 
None}, {{{2, 4}, {3, 8}, {4, 16}, {5, 31}, {6, 63}, {7, 125}, {8, 
  250}, {9, 500}}, None}}]

enter image description here

I want to label these figures as (A), (B), and ... . What is the best way to do this and how?

$\endgroup$

1 Answer 1

1
$\begingroup$

I am leaving this on top because I like it the most

Edit 2:

text0 = "Some poor souls trying to keep the referees happy";
text1 = "Figure (A)";
text2 = "Figure (B)";
text3 = "Figure (C)";
Grid[{{Style[text0, FontSize -> Scaled[0.02], 
    FontFamily -> "League Gothic"], 
   SpanFromLeft}, {Style[text1, FontSize -> Scaled[0.02], 
    FontFamily -> "Alegreya SC"], 
   Style[text2, FontSize -> Scaled[0.04], 
    FontFamily -> "Herculanum"]}, {plot, 
   plot}, {Style[text3, FontSize -> Scaled[0.05], 
    FontFamily -> "Felipa"], SpanFromLeft}, {plot, SpanFromLeft}}, 
 ItemSize -> Scaled[0.5]]

final

Edit 3: in the comments it was requested to place Figure A in the bottom and to the left, while keeping the rest aligned. The following

Labeled[ListLinePlot[{logdata002, logdata001},
  IntervalMarkers -> "Fences",
  Frame -> True,
  PlotMarkers -> {Graphics[{Disk[], {Thick, Circle[]}}], 0.04}, 
  LabelStyle -> {22, GrayLevel[0]}, 
  PlotStyle -> {{RGBColor[0.368417, 0.506779, 0.709798], 
     Thick}, {RGBColor[0.922526, 0.385626, 0.209179], Thick}},
  ImageSize -> Large,
  BaseStyle -> {FontFamily -> "Latin Modern Math"}, 
  PlotLegends -> 
   Placed[PointLegend[{Style["Theory", 
       FontFamily -> "Latin Modern Roman 10"], 
      Style["Experiment", FontFamily -> "Latin Modern Roman 10"]}, 
     LegendFunction -> "Frame"], Scaled[{0.2, 0.77}]], 
  FrameLabel -> {Style["City", FontFamily -> "Latin Modern Roman 10"],
     Style["Crimes", FontFamily -> "Latin Modern Roman 10"]}, 
  FrameTicks -> {{{2, 4, 6, 8, 10, 12, 14}, 
     None}, {{{2, 4}, {3, 8}, {4, 16}, {5, 31}, {6, 63}, {7, 125}, {8,
        250}, {9, 500}}, None}}], 
 Grid[{{Style["Figure A", FontSize -> Scaled[0.02], 
     FontFamily -> "League Gothic"]}}], {{Left, Bottom}}]

pl

Orignal

text = "some words";
Grid[{{plot}, {Style[text, FontSize -> Scaled[0.05], 
    FontFamily -> "Helvetica"]}}, ItemSize -> Scaled[0.5]]

plot

where in the above plot=ListLinePlot[....]

Edit 1: another possible way is

Column[{plot, 
  Style[text, FontSize -> Scaled[0.05], FontFamily -> "Helvetica"]}, 
 ItemSize -> Scaled[0.5]]
$\endgroup$
8
  • $\begingroup$ hey @Marteen can you please edit your question and let us know where the header should go? I had a look at the second link you provided and quite frankly I would place the header below each plot, but it's a matter of taste $\endgroup$
    – bmf
    Commented Jan 23, 2023 at 13:25
  • $\begingroup$ @Marteen yup, but you can place it on top if you add a minor adjustment to what I suggested; check this Grid[{{Style[text, FontSize -> Scaled[0.02], FontFamily -> "Helvetica"]}, {plot}}, ItemSize -> Scaled[0.5]] $\endgroup$
    – bmf
    Commented Jan 23, 2023 at 13:28
  • $\begingroup$ @Marteen the important -in my opinion- is to check how these numbers are placed Grid[{{"1", "2", "3"}, {"4", "5", "6"}, {"7", "8", "9"}}] and then you can modify appropriately and re-size your plots with headers etc $\endgroup$
    – bmf
    Commented Jan 23, 2023 at 13:30
  • $\begingroup$ @Marteen try in your plot to do FrameLabel -> {Row[{Style["Figure A", FontFamily -> "Latin Modern Roman 10"], Spacer[20], Style["City", FontFamily -> "Latin Modern Roman 10"]}], Style["Crimes", FontFamily -> "Latin Modern Roman 10"]} and tell me if that's what you want $\endgroup$
    – bmf
    Commented Jan 23, 2023 at 13:43
  • 1
    $\begingroup$ @Marteen not sure how to do that with the code above. It would need a total re-writing. I would still go with edit 2 for presenting in any journal I have published. It's the cleanest. and even with the four plots from your other question it presents itself nicely. And in the other question, try adding at the end of each plot ImageSize -> 100 and then Grid them together $\endgroup$
    – bmf
    Commented Jan 23, 2023 at 14:53

Your Answer

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