1
$\begingroup$

I have been working on this for longer than I want to admit to, but I'm finding no answers, and have no idea how this can be done.

This is MMA version 12.1

I'm trying to change the data size and color of the points in a simple 2D plot.

This is what I have:

I'm just trying to be able to make the points larger/smaller, AND change the color, so they are more prominent, but so far, it's like pulling teeth. Anyone have some suggestions please?

Thank You

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ It is best to include code as text rather than as an image, so people can copy and paste it more easily. $\endgroup$
    – MarcoB
    Jun 12, 2020 at 18:09
  • $\begingroup$ MarcoB --- Oh ok, understood. I wasn't sure. I posted this on Wolfram's forum and got my questions removed, but will remember that for here for next time, thanks. $\endgroup$
    – fiz
    Jun 15, 2020 at 15:52

1 Answer 1

4
$\begingroup$
Testdata = {{5, 5}, {2, 2}};
ListPlot[
 List /@ Testdata,
 PlotStyle -> {Directive[Red, PointSize[0.02]],
               Directive[Blue, PointSize[0.04]]}
]

plot

  • List /@ to make ListPlot consider the two points as two different plots; your case would be ambiguous otherwise: is {5, 5} to be understood as two ordinate values with implicit abscissae, or a single point?
  • you can't have multiple PlotStyles; instead, have one PlotStyle, with a list of Directives, one for each plot.
$\endgroup$
1
  • $\begingroup$ Thank you! I'll have to study this and understand MY thinking and the right way to do this. I'm still learning MMA's commands, but I really was stuck. I appreciate this! $\endgroup$
    – fiz
    Jun 15, 2020 at 15:54

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.