2
$\begingroup$

I have a listplot whose plotmarkers I want to change the size of, to no avail.

Using what I see in the related post: Specifying the size of open circle PlotMarkers in ListPlot

I get

 ListPlot[{{1, 2, 3, 5, 8}, {2, 3, 6, 9, 10}, {4, 5, 7, 10, 12}}, 
  PlotMarkers -> {Graphics[{Red, Thick, Text["\[EmptySquare]"]}, 
     ImageSize -> 10], 
    Graphics[{Red, Thick, Text["\[Beta]"]}, ImageSize -> 10], 
    Graphics[{Red, Thick, Text["\[Alpha]"]}, ImageSize -> 10]}]

I cannot get that text to appear larger, whether I put it as a Style option inside the Text function or outside the Graphics. Any ideas? This seems too convoluted too, there has to be a smarter way of specifying what I want each plotmarker to be and what size I want for each plotmarker. That ImageSize option at the end of graphics doesn't do anything either. Any ideas much appreciated.

$\endgroup$
  • $\begingroup$ Text does not scale with ImageSize. That's the core of your issue. If you wanted to you could get the word as a Graphics object. Then it would scale with ImageSize. $\endgroup$ – b3m2a1 Mar 17 '17 at 5:09
2
$\begingroup$

I cannot get that text to appear larger

This seems to work, no need for ImageSize nor Graphics actually, since your are using text for markers.

p[t_String] := Style[Text[t], {Red, Thick, 16}];

ListPlot[{{1,2,3,5,8},{2,3,6,9,10},{4,5,7,10,12}},
       PlotMarkers->{p["\[EmptySquare]"],p["\[Beta]"],p["\[Alpha]"]}]

Mathematica graphics

$\endgroup$
1
$\begingroup$

Also:

markers = First[First[ImportString[ExportString[
    Style[#, Italic, FontSize -> 20, FontFamily -> "Times"], "PDF"], 
    "PDF", "TextMode" -> "Outlines"]]] & /@ {"□", "β", "α"};

ListPlot[{{1, 2, 3, 5, 8}, {2, 3, 6, 9, 10}, {4, 5, 7, 10, 12}}, 
 Joined -> True, PlotMarkers -> (Graphics[{Red, #}, ImageSize -> 10] & /@ markers)]

Mathematica graphics

ListPlot[{{1, 2, 3, 5, 8}, {2, 3, 6, 9, 10}, {4, 5, 7, 10, 12}}, 
 Joined -> True, PlotMarkers -> (Graphics[{Red, #}, ImageSize -> 15] & /@ markers)]

Mathematica graphics

$\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.