2
$\begingroup$

I have two questions regarding ListLinePlot:

  1. I plot three data on the same frame, I use ListLinePlot, but the lines connecting the points connect them from the right instead of connecting the center of the points

  2. I want to plot thick points with thin lines I use the following code but for some reason "pointsize" doesn't work no matter what the size I write the points look the same

Note that the following is not the data I plot but I added arbitrary data so you can run the ListLinePlot:

num=Range[5];

n1={1,2,3,4,5};
n2={1.5,2.9,3.7,4.6,2.3};
n3={3.4,9.3,8,4,5}

d1=Table[{num[[i]],n1[[i]]},{i,1,Length[num]}];
d2=Table[{num[[i]],n2[[i]]},{i,1,Length[num]}];
d3=Table[{num[[i]],n3[[i]]},{i,1,Length[num]}];

ListLinePlot[{d1,d2,d3},PlotMarkers->Automatic,Frame->True,
   PlotStyle->Thickness[0.001],PlotStyle->{PointSize[0.06]}]   
$\endgroup$
  • $\begingroup$ can't run your code, since it is missing d1,d2,d3 $\endgroup$ – Nasser Jun 4 '18 at 12:51
  • $\begingroup$ I add arbitary data so you can run it , thanks $\endgroup$ – maya Jun 4 '18 at 12:58
  • $\begingroup$ Welcome maya. You can simply edit your own question with the little "edit" button beneath it. StackExchange supports a text-markup language called Markdown that lets you easily include code, italics, and many other things. I've dont this for you, but please look here before you post another question. $\endgroup$ – halirutan Jun 4 '18 at 13:07
  • $\begingroup$ @halirutan thanks $\endgroup$ – maya Jun 4 '18 at 13:12
  • 1
    $\begingroup$ "connecting from the center" is probably related to this q/a: Point Renderings Slightly Off in Mathematica $\endgroup$ – kglr Jun 4 '18 at 13:46
2
$\begingroup$

I have noticed that myself using the Win7 frontend. The plotmarkers are often placed poorly, the lines are correct. For larger plotmarkers you don't notice it, but look at this:

enter image description here

On the Raspberry Pi it renders better, so it must be a FrontEnd issue.

enter image description here

Use ListPlot[{d1, d2, d3}, Frame -> True, PlotMarkers -> {Graphics[{PointSize[.1], Point[{0, 0}]}]}, Joined -> True] instead!

$\endgroup$
1
$\begingroup$

I don't understand what you mean about connecting from the right instead of the center. On the other hand, to control the size of the PlotMarkers, you can use the setting {Automatic, size}, e.g.:

ListLinePlot[{d1,d2,d3}, PlotMarkers->{Automatic,20}, Frame->True]

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.