0
$\begingroup$

I have multiple data lists on a ListLogPlot. There are 8 data lists and each data list has 6 {x,y} points, and I want each point to have a different marker, on the same plot. Is this possible?

My code so far is as below:

Plot1 = {{2.10013, 0.0000100688}, {2.10013, 4.89108*10^-8}, {2.10013, 1.15283*10^-8}, {2.10013, 6.04358*10^-9}, {2.10013, 2.96581*10^-9}, {2.10013, 1.7618*10^-9}}
Plot2 ={{0.9758, 7.64394*10^-6}, {0.9758, 2.19517*10^-8}, {0.9758, 7.62142*10^-9}, {0.9758, 3.1309*10^-9}, {0.9758, 1.6758*10^-9}, {0.9758, 1.18639*10^-9}}
Plot3 = {{2.552, 0.0000124046}, {2.552, 9.67008*10^-8}, {2.552, 3.49325*10^-8}, {2.552, 1.61281*10^-8}, {2.552, 8.06587*10^-9}, {2.552, 3.43834*10^-9}}
Plot4 = {{4.203, 0.0000239139}, {4.203, 2.27623*10^-7}, {4.203, 1.67293*10^-8}, {4.203, 7.8656*10^-9}, {4.203, 4.97852*10^-9}, {4.203, 2.68124*10^-9}}
Plot5 =  {{1.882, 0.000011998}, {1.882, 5.47129*10^-8}, {1.882, 2.08299*10^-8}, {1.882, 1.09622*10^-8}, {1.882, 6.40376*10^-9}, {1.882, 3.50434*10^-9}}
Plot6 = {{5.042, 0.0000227577}, {5.042, 7.73744*10^-8}, {5.042, 2.61552*10^-8}, {5.042, 1.39492*10^-8}, {5.042, 7.96422*10^-9}, {5.042, 5.15056*10^-9}}
Plot7 = {{6.205, 0.0000575172}, {6.205, 3.19688*10^-7}, {6.205, 1.16727*10^-7}, {6.205, 5.97103*10^-8}, {6.205, 2.88467*10^-8}, {6.205, 1.37238*10^-8}}
Plot8 = {{3.743, 0.0000176255}, {3.743, 7.67293*10^-8}, {3.743, 2.6812*10^-8}, {3.743, 1.45814*10^-8}, {3.743, 9.44051*10^-9}, {3.743, 6.23063*10^-9}}
Markers = {"a", "b", "c", "d", "e", "f"};
ListLogPlot[{Plot1,Plot2,Plot3,Plot4,Plot5,Plot6,Plot7,Plot8}, PlotStyle -> {Red, Blue, Purple, Green, Orange, Magenta, Cyan, Pink}, PlotLegends -> {1,2,3,4,5,6,7,8}

This shows my data lists on the plot fine, but when I add PlotMarkers -> Markers it sets Plot1 to a, Plot2 to b etc. Is there any way around this so that {2.10013, 0.0000100688} = a, {2.10013, 4.89108*10^-8} = b, and so on for each plot? I.e. all the blue points below labelled a, b, c... red a, b ,c... etc enter image description here

$\endgroup$
6
  • $\begingroup$ Welcome to the Mathematica Stack Exchange. Please load all the lists of data. The words "dataset" and "plot markers" have known meaning in Mathematica even if these are spelled a bit differently. Thanks. $\endgroup$
    – Syed
    May 10, 2022 at 10:41
  • $\begingroup$ Thank you, I've edited to add the actual data to my post. $\endgroup$
    – Schaef
    May 10, 2022 at 10:48
  • 1
    $\begingroup$ If I understand what you want, try transposing your data: ListLogPlot[Transpose@ {Plot1, Plot2, Plot3, ...., Plot8}, <rest of your options>, PlotMarkers -> Markers]. $\endgroup$
    – MarcoB
    May 10, 2022 at 12:25
  • 1
    $\begingroup$ Also, you could save yourself future grief by not capitalizing your variables and functions so they cannot get confused with MA commands. Plot and Marker is akin to asking for such trouble. $\endgroup$
    – Nicholas G
    May 10, 2022 at 12:40
  • $\begingroup$ @MarcoB This works for the actual marker names themselves but changes the colours so that all the a values are blue, b values red etc. Rather than all of the Plot1 values being blue, and then marked. If that makes sense? $\endgroup$
    – Schaef
    May 10, 2022 at 13:09

1 Answer 1

1
$\begingroup$
data[1] = {{2.10013, 0.0000100688}, {2.10013, 4.89108*10^-8}, {2.10013, 1.15283*10^-8}, {2.10013, 6.04358*10^-9}, {2.10013, 2.96581*10^-9}, {2.10013, 1.7618*10^-9}};
data[2] = {{0.9758, 7.64394*10^-6}, {0.9758, 2.19517*10^-8}, {0.9758, 7.62142*10^-9}, {0.9758, 3.1309*10^-9}, {0.9758, 1.6758*10^-9}, {0.9758, 1.18639*10^-9}};
data[3] = {{2.552, 0.0000124046}, {2.552, 9.67008*10^-8}, {2.552, 3.49325*10^-8}, {2.552, 1.61281*10^-8}, {2.552, 8.06587*10^-9}, {2.552, 3.43834*10^-9}};
data[4] = {{4.203, 0.0000239139}, {4.203, 2.27623*10^-7}, {4.203, 1.67293*10^-8}, {4.203, 7.8656*10^-9}, {4.203, 4.97852*10^-9}, {4.203, 2.68124*10^-9}};
data[5] = {{1.882, 0.000011998}, {1.882, 5.47129*10^-8}, {1.882, 2.08299*10^-8}, {1.882, 1.09622*10^-8}, {1.882, 6.40376*10^-9}, {1.882, 3.50434*10^-9}};
data[6] = {{5.042, 0.0000227577}, {5.042, 7.73744*10^-8}, {5.042, 2.61552*10^-8}, {5.042, 1.39492*10^-8}, {5.042, 7.96422*10^-9}, {5.042, 5.15056*10^-9}};
data[7] = {{6.205, 0.0000575172}, {6.205, 3.19688*10^-7}, {6.205, 1.16727*10^-7}, {6.205, 5.97103*10^-8}, {6.205, 2.88467*10^-8}, {6.205, 1.37238*10^-8}};
data[8] = {{3.743, 0.0000176255}, {3.743, 7.67293*10^-8}, {3.743, 2.6812*10^-8}, {3.743, 1.45814*10^-8}, {3.743, 9.44051*10^-9}, {3.743, 6.23063*10^-9}};
myMarkers = {"a", "b", "c", "d", "e", "f"};

alldata = Array[data,8];

ListLogPlot[
Flatten[alldata,{2}]
, PlotStyle -> Array[Hue,Length[alldata],{0,0.9}]
, PlotLegends -> Range[Length[alldata]]
, PlotMarkers->myMarkers
]

enter image description here

$\endgroup$

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.