0
$\begingroup$

Currently i'm stuck at problem, where i have a sets of points, and I wish to plot these point with different plot markers, and also with different plot legend. The code is the following:

    filteredLength={{356., 362., 375., 339., 346., 351., 357., 328., 347.}, {377., 365., 
      388., 336., 361., 359., 323., 359., 381.}}

    Rsquared={{0.999189, 0.999533, 0.998305, 0.992933, 0.999151, 0.999383, 
      0.999122, 0.996901, 0.999277}, {0.999497, 0.999238, 0.98825, 
      0.998982, 0.999436, 0.999387, 0.998706, 0.999248, 
      0.999491}}
filteredName={{"Downhill_Simplex", "Downhill_Simplex_weight_1_10", 
      "Downhill_Simplex_weight_2_10", "Downhill_Simplex_weight_3_10", 
      "Hooke_Jeves", "Hooke_Jeves_wieght_1_10", "Hooke_Jeves_wieght_2_10",
       "Hooke_Jeves_weight_3_10", "ASA"}, {"Downhill_simplex", 
      "Downhill_simplex_weight_1_10", "Downhill_simplex_weight_2_10", 
      "Downhill_simplex_weight_3_10", "Hooke_Jeves",
      "Hooke_Jeves_weight_1_10", "Hooke_Jeves_weight_2_10", 
      "Hooke_Jeves_weight_3_10", "ASA"}}
    toPlot = List[];
    Do[
     AppendTo[toPlot, Thread[{filteredLength[[i]], Rsquared[[i]]}]], {i, 
      1, 6}]
    plots = Table[Symbol["plot" <> ToString@i], {i, 1, 2}];

    Do[
     Do[
      plots[[i]] = 
        ListPlot[toPlot[[i, j]], Joined -> False, AxesOrigin -> {0, 0}, 
         PlotRange -> All, GridLines -> Automatic, Frame -> True, 
         FrameStyle -> Directive[11], 
         GridLinesStyle -> Directive[Gray, Dashed],
         FrameTicksStyle -> Directive[14], PlotMarkers -> Automatic, 
         PlotLegends -> ArrayReshape[filteredName[[i]], {9, 1}]];
      , {j, 1, 2}]
     , {i, 1, 2}]

I hope you can provide me a solution. Thank you in advance: David

$\endgroup$
1
  • 1
    $\begingroup$ Please boil this down to a minimal working example. First two issues: toPlot needs to be defined first (I guess as toPlot={}), and ImageSize -> 15 cm is erratic. Even when fixed, your output doesn't say what you are after. Use words to describe your goal. $\endgroup$
    – corey979
    Oct 17 '18 at 20:48
1
$\begingroup$
data = Legended[{{#, #2}}, #3] & @@@ (Join @@ 
     Thread /@ Transpose[{filteredLength, Rsquared, filteredName}]);
ListPlot[data, PlotMarkers -> {Automatic, 8}]

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.