5
$\begingroup$

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

$\endgroup$
3
  • 1
    $\begingroup$ \[EmptySquare] \[EmptyCircle] \[EmptyDiamond] $\endgroup$ Jul 12, 2019 at 0:54
  • $\begingroup$ Related: mathematica.stackexchange.com/questions/84857/… $\endgroup$
    – Michael E2
    Jul 12, 2019 at 4:19
  • 1
    $\begingroup$ Note that PlotMarkers -> "OpenMarkers" was added in version 12. It does what the OP wants but is not available in V11.3. $\endgroup$
    – Michael E2
    Jul 12, 2019 at 4:24

2 Answers 2

6
$\begingroup$

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

$\endgroup$
6
  • $\begingroup$ This doesn't work in V12 with the warning Set::shape: Lists {circle,uptriangle,diamond,square,downtriangle} and ChartingCommonDumpGraphicsOpenPlotMarkers[] are not the same shape. $\endgroup$ Jul 12, 2019 at 1:08
  • $\begingroup$ @Okkes, it works on Wolfram Cloud (v12). You can try {circle,uptriangle,diamond,square,downtriangle} = ChartingCommonDumpGraphicsOpenPlotMarkers[][[;;5]] $\endgroup$
    – kglr
    Jul 12, 2019 at 1:11
  • 1
    $\begingroup$ @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. $\endgroup$
    – Michael E2
    Jul 12, 2019 at 4:24
  • $\begingroup$ My bad. I guess the issue was backtick was missing when I pasted it. $\endgroup$ Jul 12, 2019 at 23:27
  • $\begingroup$ It looks like you need to generate a ListPlot before this command will work, at least in v13.0. $\endgroup$
    – tparker
    Mar 3 at 15:10
4
$\begingroup$

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.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.