0
$\begingroup$

I tried to build graphic using ListPlot Code:

rand1 = RandomReal[1, 10];

rand2 = RandomReal[1, 10];

Data1 = List[{Part[rand1[[1]]], Part[rand2[[1]]]}];
Data2 = List[{Part[rand1[[2]]], Part[rand2[[2]]]}];
Data3 = List[{Part[rand1[[3]]], Part[rand2[[3]]]}];
Data4 = List[{Part[rand1[[4]]], Part[rand2[[4]]]}];
Data5 = List[{Part[rand1[[5]]], Part[rand2[[5]]]}];
Data6 = List[{Part[rand1[[6]]], Part[rand2[[6]]]}];
Data7 = List[{Part[rand1[[7]]], Part[rand2[[7]]]}];
Data8 = List[{Part[rand1[[8]]], Part[rand2[[8]]]}];
Data9 = List[{Part[rand1[[9]]], Part[rand2[[9]]]}];
Data10 = List[{Part[rand1[[10]]], Part[rand2[[10]]]}];

ListPlot[{Data1, Data2, Data3, Data4, Data5, Data6, Data7, Data8, 
Data9, Data10}, PlotLegends -> PointLegend
[
Automatic, {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"} , 
LegendFunction -> "Frame", LegendLabel -> "Data:"], 
PlotStyle -> PointSize[Medium], Frame -> True,
FrameLabel -> {Style["x", FontSize -> 16], 
Style["y", FontSize -> 16]},
PlotRange -> {All, All}, FrameTicks -> {{All, All}, {All, All}}, 
ImageSize -> 1000
]

As a result I got: enter image description here

How I can to increase dots size and how I can to join dots? I tried to use PlotLegent->PointSize[] and Joined->True and it doesn't work.

$\endgroup$
  • $\begingroup$ Perhaps you could use Disk[]? One of the arguments for that is the size. That's where I'd start at least. I haven't made a scatter graph on here, but that's how I solved my need to control point size! Let me know if it helps/works :) $\endgroup$ – Reedinationer Dec 6 '18 at 23:23
1
$\begingroup$
SeedRandom[0]

data = RandomReal[1, {10, 2}] // Sort;

data is sorted to keep line from criss-crossing.

len = Length[data];

colors = ColorData[97][#] & /@ Range[len];

Legended[
 ListPlot[
  List /@ Tooltip /@ data, (* make each point a separate data set *)
   PlotMarkers -> (Style["•", 50, #] & /@ colors),
  Prolog -> {Gray, Line[data]},
  ImageSize -> 800],
 PointLegend[colors, Range[len],
  LegendFunction -> "Frame",
  LegendLabel -> "Data:",
  LegendMarkerSize -> Large,
  LegendMargins -> {{10, 10}, {10, 10}}]]

enter image description here

$\endgroup$
  • $\begingroup$ @John - Does increasing LegendMarkerSize do enough? Also changed Epilog to Prolog so that line is not drawn on top of PlotMarkers $\endgroup$ – Bob Hanlon Dec 7 '18 at 1:09

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.