Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have large data consisting of values obtained by sweeping across three parameters (e, w, and f). I want to plot all this data on one graph using different shapes for e (e.g., circle, triangle, square, and diamond), different colors for w, and a letter inside the shape for f. So far I have

Jw1e1 = {{16, 832}, {32, 3150}, {64, 12237}, {128, 48212}};
J1 = ListLogPlot[Jw1e1, PlotMarkers -> (Style[Framed[H], Red]), 
  Frame -> True]
Jw1e3 = {{16, 826}, {32, 3127}, {64, 12145}, {128, 47851}};
J3 = ListLogPlot[Jw1e1, PlotMarkers -> (Style[Framed[H], Blue]), 
  Frame -> True]
Show[J1, J3]

I cannot figure out how have a square, circle, etc. appear as the specified shape by changing Framed[H]. If I replace Framed[H] by Circle[], Circle[{0, 0}] appears on my plots and replacing by Circle[H], Circle[H] appears.

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

Update: Using some of the ideas in the linked Q/As, you can get a finer customization of your markers:

Jw1e1 = {{16, 832}, {32, 3150}, {64, 12237}, {128, 48212}};
Jw1e3 = {{16, 826}, {32, 3127}, {64, 12145}, {128, 47851}};
(* second list modified so that the two plots do not overlap*)
lists = {Jw1e1, {1, .5} # & /@ Jw1e3} ;
markerDisk = Graphics[{Opacity[.6],
 Dynamic@EdgeForm[{clr = CurrentValue["Color"], Thick}],
 Dynamic[FaceForm@Lighter@clr], Disk[], Opacity[1],
 Style[Text[#], White, Bold, 16]}, ImagePadding -> Scaled[.01]] &;
ListLogPlot[lists, Joined -> True, ImageSize -> 500,
PlotRangeClipping -> False, ImagePadding -> 35,
PlotMarkers :> ({markerDisk[#], 0.15} & /@ {A, B})]]

enter image description here


From Docs > PlotMarkers > Details:

enter image description here

 mrkr = Graphics[{Red, Thick, Circle[], Style[Text[H], Red, Bold, 24]}]; 
 ListLogPlot[Jw1e1, PlotMarkers -> {mrkr, .2}, Frame -> True]

enter image description here

Related Q/As

Why doesn' t PlotMarker option None return no PlotMarkers?

ListPlot with plotmarkers determined by point

share|improve this answer
    
Quick question. Why does the command markerDisk2 = Graphics[{Opacity[.5], Dynamic@EdgeForm[{clr = CurrentValue["Color"], Thick}], Dynamic[FaceForm@Lighter@clr], Rectangle[], Opacity[1], Style[Text[A], Black, Bold, 18]}, ImagePadding -> Scaled[.2]] &; ListLogPlot[Je1w1H, Joined -> True, ImageSize -> 500, PlotRangeClipping -> False, ImagePadding -> 35, PlotMarkers :> ({markerDisk2[#], 0.15} & /@ {A, B})] have the letters offset from the Rectangle? –  namu Feb 3 '13 at 6:40
add comment

You were nearly there:

Jw1e1 = {{16, 832}, {32, 3150}, {64, 12237}, {128, 48212}};

J1 = ListLogPlot[Jw1e1, 

  PlotMarkers -> (Style[Framed[H, RoundingRadius -> 20], Red]), 

  Frame -> True]

The nice thing here is that you can play around with RoundingRadius and that longer/larger text markers will be properly framed as well.

J1 = ListLogPlot[Jw1e1, 

  PlotMarkers -> (Style[

     Framed["Longer than strictly necessary", RoundingRadius -> 20], 

     Red]), Frame -> True]

Driving it home:

J1 = ListLogPlot[Jw1e1, 

  PlotMarkers -> 

   Framed[Style["Larger than \n strictly necessary", Large, Red], 

    RoundingRadius -> 20], Frame -> True]

Mathematica graphics

share|improve this answer
    
Interesting these RoundingRadius property. 1+ –  Murta Jan 31 '13 at 23:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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