Message Boards Message Boards

Meshing curve markers for monochrome dense data plot

Posted 8 years ago

Hey everyone!

I have a list line plot which shall be contain 4 curves, that can be distinguished in a monochrome jpeg. For this reason I use the following code.

ListLinePlot[Join[plotstate2], AspectRatio->6.0/20, ImagePadding->padding,PlotRange->{{15,70},{-0.1,1.6}},InterpolationOrder->0,
AxesStyle->Black, Epilog->{Text["t [s]",{66,0.2},{0,0}]},
PlotLegends->Placed[LineLegend[{"Subscript[x, 2]","Subscript[y, 2]","Subscript[z, 2]","Subscript[\[Psi], 2]"},LabelStyle->{Black,11},LegendLayout->{"Row",1},LegendMarkerSize->10],{0.60,0.85}], 
AspectRatio-> 6.0/20,ImageSize-> {10cm},
PlotTheme->"Monochrome",PlotLegends->"Expressions"
]
Export["1.png", Show[p1], ImageResolution -> 300];

And I get the following plot: As I have many points, the curve is full of point markers. As I just want to mark the different curves with them, I tried to mesh Without Mesh -> To many markers!

p1=ListLinePlot[Join[plotstate2],AspectRatio->6.0/20,ImagePadding->padding,PlotRange->{{15,70},{-0.1,1.6}},PlotStyle->{Dashing,Dotted},InterpolationOrder->0,AxesStyle->Black,
Epilog->{Text["t [s]",{66,0.2},{0,0}]},
PlotLegends->Placed[LineLegend[{"Subscript[x, 2]","Subscript[y, 2]","Subscript[z, 2]","Subscript[\[Psi], 2]"},LabelStyle->{Black,11},LegendLayout->{"Row",1},LegendMarkerSize->10],{0.60,0.85}],
AspectRatio-> 6.0/20,ImageSize-> {10cm},
PlotTheme->"Monochrome",PlotLegends->"Expressions",Mesh->10
]
Export["1.png",Show[p1],ImageResolution->300];

which leads to: With Mesh -> Right amount of markers but symbols are the same

Any Ideas on how to resolve the issue? Thanks a lot in advance!

POSTED BY: Jan Dentler
3 Replies

Add PlotMarkers -> Automatic to your options. That should work. I don't have the data so I can't test it for you...

POSTED BY: Sander Huisman
Posted 8 years ago

Hey thanks for the answer, but that doesn't work, as the automatic setting is putting a marker at every sample point which leads to figure [1].

POSTED BY: Jan Dentler

I DO understand your question now:

data=Table[{i,i^n},{n,1,4},{i,0,1,0.01}];
l1=ListPlot[data,Joined->True]
l2=ListPlot[data[[All,;;;;10]],Joined->False,PlotMarkers->Automatic]
Show[{l1,l2}]

Combine two plots is the easiest way: one just lines l1, and then some with markers with is a reduced set l2. Combine them using Show.

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract