6

I'm generating a ListPlot and wanting to use Open Markers like in the 2nd example here, however I don't want the word "Open Markers" - I just want open circles/diamonds etc. Are there default shapes you can still access with mathematica like this, or do you need to create all your own markers and define directly?

I know I can create all my own markers and make it anything I want, but I was hoping for some simple defaults that you can easily access. I've tried using Circle, Diamond, Square because those auto-completed, but I just get the words, not the symbols.

e.g.

ListPlot[{{1, 2, 3, 5, 8}, {2, 3, 6, 9, 10}, {4, 5, 7, 10, 12}}, 
 PlotMarkers -> "OpenMarkers"]

I am using v11.3.0

Esme_
  • 693
  • 4
  • 12

2 Answers2

7

You can get markers using Charting`CommonDump`GraphicsOpenPlotMarkers:

{circle, uptriangle, diamond, square, downtriangle} = 
   Charting`CommonDump`GraphicsOpenPlotMarkers[][[;;5]];

ListPlot[{{1, 2, 3, 5, 8}, {2, 3, 6, 9, 10}, {4, 5, 7, 10, 12}}, 
 PlotMarkers -> {uptriangle, circle, square}]

enter image description here

kglr
  • 394,356
  • 18
  • 477
  • 896
  • This doesn't work in V12 with the warning Set::shape: Lists {circle,uptriangle,diamond,square,downtriangle} and ChartingCommonDumpGraphicsOpenPlotMarkers[] are not the same shape. – OkkesDulgerci Jul 12 '19 at 01:08
  • @Okkes, it works on Wolfram Cloud (v12). You can try {circle,uptriangle,diamond,square,downtriangle} = ChartingCommonDumpGraphicsOpenPlotMarkers[][[;;5]] – kglr Jul 12 '19 at 01:11
  • 1
    @OkkesDulgerci It works in V12 for me (Mac), but it does not work in V11.3, the version the OP has. BTW, PlotMarkers -> "OpenMarkers" does the same thing. – Michael E2 Jul 12 '19 at 04:24
  • My bad. I guess the issue was backtick was missing when I pasted it. – OkkesDulgerci Jul 12 '19 at 23:27
  • It looks like you need to generate a ListPlot before this command will work, at least in v13.0. – tparker Mar 03 '23 at 15:10
  • I was looking how to get the default ones and ended up here so in case someone follows the same path: Charting\CommonDump`GraphicsPlotMarkers` likewise gives the default filled in ones. – Kvothe Nov 22 '23 at 18:03
4

Here's a way to get to the open markers on V11.3, which start with the 6th plot marker in the standard V11.3 sequence of markers:

ListPlot[{{1, 2, 3, 5, 8}, {2, 3, 6, 9, 10}, {4, 5, 7, 10, 12}}, 
 PlotMarkers -> RotateLeft[Graphics`PlotMarkers[], 5]]

enter image description here

Note: V12 introduced PlotMarkers -> "OpenMarkers" (and Charting`CommonDump`GraphicsOpenPlotMarkers[], which @kglr's answer shows), which is a simpler way to get the desired result; however, it is unavailabe to the OP.

Michael E2
  • 235,386
  • 17
  • 334
  • 747