2
$\begingroup$

I have the following code:

Mobility210419ZcI = {{10, 14.15}, {10, 16.36}, {10, 17.99}, {40, 
    14.86}, {40, 19.65}, {40, 17.22}, {100, 20.28}, {100, 
    19.16}, {100, 19.18}, {150, 21.86}, {150, 20.7}, {150, 
    22.75}, {200, 22.06}, {200, 22.05}, {200, 20.46}, {250, 
    20.12}, {250, 25.44}, {250, 24.7}, {300, 24.21}, {300, 
    22.76}, {300, 23.52}};
Mobility210419ZcIData = 
 KeyValueMap[List]@
  GroupBy[Mobility210419ZcI   , First -> Last, 
   Around[Mean@#, StandardDeviation@#] &]
Al0point58GaNexp = 
 ListPlot[Mobility210419ZcIData, PlotRange -> {{0, 305}, {0, 800}}, 
  Frame -> True, AspectRatio -> GoldenRatio, 
  FrameLabel -> {"Temperature (K)", 
    "Mobility (\!\(\*SuperscriptBox[\(cm\), \(2\)]\)/V.s)"}, 
  BaseStyle -> {FontSize -> 15}, 
  PlotStyle -> {PointSize -> 0.025, Thick, Brown}  , 
  GridLines -> None, ImageSize -> 400, FrameStyle -> Black, 
  IntervalMarkersStyle -> LightGray, PlotLegends -> {"E"}]

It gives this output enter image description here

You can clearly see that the legend point has a very small size. How should I correct it?

$\endgroup$
3
  • $\begingroup$ I take it you are referring to the almost invisible dot, next to the letter E on the right of the plot? $\endgroup$
    – mikado
    Jun 13 at 16:41
  • $\begingroup$ Yes that is correct! $\endgroup$ Jun 13 at 16:43
  • $\begingroup$ Use PlotLegends -> PointLegend[{"E"}, LegendMarkers -> Graphics[Disk[]]]. If you want to enlarge it further, play with LegendMarkerSize option in the PointLegend. $\endgroup$
    – Ben Izd
    Jun 13 at 17:08
4
$\begingroup$

@Bed_Izd really had this, but I thought to post a complete answer before the end of the day.

Happy to withdrawal it if @Bed_Izd wants to post.

Mobility210419ZcI = {{10, 14.15}, {10, 16.36}, {10, 17.99}, {40, 
    14.86}, {40, 19.65}, {40, 17.22}, {100, 20.28}, {100, 
    19.16}, {100, 19.18}, {150, 21.86}, {150, 20.7}, {150, 
    22.75}, {200, 22.06}, {200, 22.05}, {200, 20.46}, {250, 
    20.12}, {250, 25.44}, {250, 24.7}, {300, 24.21}, {300, 
    22.76}, {300, 23.52}};

Mobility210419ZcIData = 
  KeyValueMap[List]@
   GroupBy[Mobility210419ZcI, First -> Last, 
    Around[Mean@#, StandardDeviation@#] &];

Al0point58GaNexp = ListPlot[
  Mobility210419ZcIData, PlotRange -> {{0, 305}, {0, 800}}, 
  Frame -> True, AspectRatio -> GoldenRatio, 
  FrameLabel -> {"Temperature (K)", 
    "Mobility (\!\(\*SuperscriptBox[\(cm\), \(2\)]\)/V.s)"},
  BaseStyle -> {FontSize -> 15},
  PlotStyle -> {PointSize -> 0.025, Thick, Brown},
  GridLines -> None,
  ImageSize -> 400,
  FrameStyle -> Black,
  IntervalMarkersStyle -> LightGray,
  PlotLegends ->
   PointLegend[{"E"},
    LegendMarkers -> Graphics[Disk[]],
    LegendMarkerSize -> Medium
    ]]

LegendMarkerSize give you all the control you'd need.

enter image description here

$\endgroup$

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.