1
$\begingroup$

I want to graph ten lines (of a single color) with points at the ends. The points are "cells" and the lines are "veins". I have tried it as follows.

ListPlot[Flatten[Table[{i - 1, j/149}, {i, 1, 2}, {j, 1, 10}], 1]];

Graphics[ListPlot[Table[{i - 1, j/149}, {i, 1, 2}, {j, 1, 10}]]];

Graphics[ListLinePlot[Table[{{0, j/149}, {1, j/149}}, {j, 1, 10}]]];

I appreciate any help.

$\endgroup$
2
$\begingroup$
data = Transpose @ Table[{i - 1, j/149}, {i, 1, 2}, {j, 1, 10}];

Show[ListPlot[data, Joined -> #, PlotStyle -> Blue] & /@ {True, False}]

enter image description here

Also

ListLinePlot[data, PlotStyle -> Blue, 
 Epilog -> {Blue, PointSize[Medium], Point /@ data}]

ListLinePlot[data, PlotStyle -> Blue, 
  Mesh -> All, MeshStyle -> Directive[Blue, PointSize[Medium]]]

Graphics[{Blue, Line@data, PointSize[Medium], Point /@ data}, 
 Axes -> True, AxesOrigin -> {0, 0}, AspectRatio -> 1/GoldenRatio]

all give the same picture.

You can also use PlotMarkers to add the points:

ListPlot[data, Joined -> True, PlotStyle -> Blue, PlotMarkers -> {"●", 14}]

or

ListLinePlot[data, PlotStyle -> Blue, PlotMarkers -> {"●", 14}]
$\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.