1
$\begingroup$

I Have two plots with markers I wanted to combine the two plots using show but it is not happening, I have changed the plot range but still, I could not able to combine.

data1 = {{0.01, 1.8743}, {1., 1.8784}, {2., 1.88248}, {4., 

   1.89049}, {6., 1.89828}, {8., 1.90587}, {10., 1.91327}, {25., 
   1.96335}, {50., 2.03035}, {100., 2.12536}, {200., 2.23701}, {300., 
   2.30098}, {400., 2.34255}, {500., 2.37175}, {600., 2.3934}, {800., 
   2.42334}, {1000., 2.44307}, {2000., 2.48725}, {4000., 
   2.51208}, {5000., 2.5173}, {10000., 2.52799}, {15000., 
   2.53164}, {20000., 2.53348}, {30000., 2.53533}, {40000., 
   2.53625}, {70000., 2.53745}, {100000., 2.53793}, {1.*10^6, 
   2.53894}, {1.*10^8, 2.53909}, {1.*10^12, 2.53543}}
data2 = {{0.01, 4.69367}, {1., 4.69699}, {2., 4.70034}, {4., 
   4.70701}, {6., 4.71363}, {8., 4.72021}, {10., 4.72675}, {25., 
   4.77457}, {50., 4.84965}, {100., 4.98446}, {200., 5.20483}, {300., 
   5.37646}, {400., 5.51306}, {500., 5.62373}, {600., 5.71474}, {800.,
    5.85448}, {1000., 5.9557}, {2000., 6.20643}, {4000., 
   6.35701}, {5000., 6.38884}, {10000., 6.45382}, {15000., 
   6.47579}, {20000., 6.48682}, {30000., 6.49788}, {40000., 
   6.50342}, {70000., 6.51055}, {100000., 6.5134}, {1.*10^6, 
   6.51939}, {1.*10^8, 6.52013}, {1.*10^12, 6.52016}}
marker1 = {{Log@ks1[[5]], b1[[5]]}, {Log@ks1[[24]], b1[[24]]}};
marker2 = {{Log@ks1[[6]], b2[[6]]}, {Log@ks1[[25]], b2[[25]]}};
star = First[
   First[ImportString[
     ExportString[Style["\[SixPointedStar]", FontSize -> 16], "PDF"], 
     "PDF", "TextMode" -> "Outlines"]]];
emptyhex = 
  Graphics[{EdgeForm[{Thickness[.1], Red}], White, star}, 
   ImageSize -> 20];
filledhex = Graphics[{EdgeForm[], Red, star}, ImageSize -> 20];

s1 = ListLogLinearPlot[Transpose[{ks1, b1}], Joined -> True, 
  PlotStyle -> {Black, Thickness[0.01]}, AxesStyle -> Black, 
  Epilog -> {Inset[filledhex, marker1[[1]]], 
    Inset[emptyhex, marker1[[2]]]}, PlotRangeClipping -> False, 
  PlotRange -> All]
s2 = ListLogLinearPlot[Transpose[{ks1, b2}], Joined -> True, 
  PlotStyle -> {Black, Thickness[0.01]}, AxesStyle -> Black, 
  Epilog -> {Inset[filledhex, marker2[[1]]], 
    Inset[emptyhex, marker2[[2]]]}, PlotRangeClipping -> False, 
  PlotRange -> All]
Show[s1, s2, PlotRange -> Automatic]
$\endgroup$
1
  • 1
    $\begingroup$ ks1, ks2, b1 and b2? $\endgroup$
    – kglr
    Jan 13, 2019 at 9:14

1 Answer 1

2
$\begingroup$
s1 = ListLogLinearPlot[Transpose[{ks1, b1}], Joined -> True, 
  PlotStyle -> {Black, Thickness[0.01]}, AxesStyle -> Black, 
  PlotRangeClipping -> False, PlotRange -> All]
s2 = ListLogLinearPlot[Transpose[{ks1, b2}], Joined -> True, 
  PlotStyle -> {Black, Thickness[0.01]}]
Show[s1, s2, PlotRange -> All, 
 Epilog -> {Inset[filledhex, marker1[[1]]], Inset[emptyhex, marker1[[2]]], 
   Inset[filledhex, marker2[[1]]], Inset[emptyhex, marker2[[2]]]}]

enter image description here

Note: In Show unspecified options are taken from the first argument. In your case, the value of the option Epilog from s1 is used by Show.

$\endgroup$

Your Answer

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

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