1
$\begingroup$

I'd like to plot two sets of coordinates in two different arrays using ListLogPlot, and be able to individually specify the sizes and colors of the datapoints for each array.

Things seem to work fine if I allow Mathematica to specify point sizes and colors automatically:

ListLogPlot[{ListA, ListB}, ImageSize -> {800, 800}]

I can also specify that datapoints for ListA should be Red and that datapoints for ListB should be Blue:

ListLogPlot[{ListA, ListB}, PlotStyle -> {Red, Blue}, ImageSize -> {800, 800}]

However, attempting to specify a PointSize for one or either array seems to break things:

ListLogPlot[{ListA, ListB}, PlotStyle -> {PointSize[0.02], Red, Blue}, ImageSize -> {800, 800}]

Here, the colors are correct, but only ListB datapoints are rescaled to the correct size.

I've also tried using Show[], and specifying the plots individually therein, but this seems to generate a plot with an axis scaled only for one of the datasets.

Why is this happening, and how might I work around it?

$\endgroup$
  • $\begingroup$ Dear user7231, Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign!, and change your user for something more "human"! $\endgroup$ – Dr. belisarius May 6 '13 at 15:56
1
$\begingroup$

This works here ...

{listA, listB} = {{1, 2, 3, 4}, {5, 6, 7, 8}}; 
ListLogPlot[{listA, listB}, PlotStyle -> {{PointSize[0.02], Red}, {PointSize[0.04],  Blue}}]

enter image description here

$\endgroup$
  • $\begingroup$ Got it, I see how the specification needs to be done now with PlotStyle. $\endgroup$ – user7231 May 6 '13 at 12:06

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.