1
$\begingroup$

I need to plot this data in Log scale for both axes, and also need to add a legend. But since they are joined dots, the legend that appears is just a dot instead the plotstyle I choose.

data1 = {{0.0001`, 618.69`}, {0.00010202`, 630.68`}, {0.00010408`, 
    642.89`}, {0.00010618`, 655.35`}, {0.00010833`, 
    668.04`}, {0.00011052`, 680.98`}, {0.00011275`, 
    694.17`}, {0.00011503`, 707.61`}, {0.00011735`, 
    721.32`}, {0.00011972`, 735.29`}, {0.00012214`, 
    749.53`}, {0.00012461`, 764.04`}, {0.00012712`, 
    778.84`}, {0.00012969`, 793.92`}, {0.00013231`, 
    809.29`}, {0.00013499`, 824.96`}, {0.00013771`, 
    840.93`}, {0.00014049`, 857.21`}, {0.00014333`, 
    873.81`}, {0.00014623`, 890.72`}, {0.00014918`, 
    907.96`}, {0.0001522`, 925.54`}, {0.00015527`, 
    943.45`}, {0.00015841`, 961.71`}, {0.00016161`, 
    980.32`}, {0.00016487`, 999.29`}, {0.0001682`, 
    1018.6`}, {0.0001716`, 1038.3`}, {0.00017507`, 
    1058.4`}, {0.0001786`, 1078.9`}, {0.00018221`, 
    1099.8`}, {0.00018589`, 1121.`}, {0.00018965`, 
    1142.7`}, {0.00019348`, 1164.8`}, {0.00019739`, 
    1187.3`}, {0.00020138`, 1210.3`}, {0.00020544`, 
    1233.7`}, {0.00020959`, 1257.5`}, {0.00021383`, 
    1281.8`}, {0.00021815`, 1306.6`}, {0.00022255`, 
    1331.8`}, {0.00022705`, 1357.6`}, {0.00023164`, 
    1383.8`}, {0.00023632`, 1410.5`}, {0.00024109`, 
    1437.8`}, {0.00024596`, 1465.5`}, {0.00025093`, 
    1493.8`}, {0.000256`, 1522.6`}, {0.00026117`, 
    1552.`}, {0.00026645`, 1582.`}, {0.00027183`, 
    1612.5`}, {0.00027732`, 1643.6`}}
ListLogLinearPlot[data1, Joined -> True, PlotStyle -> Dotted, 
 PlotLegends -> {"data"}]
$\endgroup$
5
  • 1
    $\begingroup$ ListLogLinearPlot[data1, Joined -> True, PlotStyle -> Dotted, PlotLegends -> LineLegend[{"data"}]]? $\endgroup$
    – kglr
    Apr 16 '15 at 20:30
  • $\begingroup$ ListLogLinearPlot[data1, Joined -> True, PlotStyle -> Dotted, PlotLegends -> SwatchLegend[{Automatic}, {"data"}]] $\endgroup$ Apr 16 '15 at 20:57
  • $\begingroup$ @kguler , it works perfectly. $\endgroup$ Apr 16 '15 at 21:30
  • $\begingroup$ @Jhon, I get a square instead a line as a legend. Since I pretend to plot several sets of data, a square could not be useful. Thanks $\endgroup$ Apr 16 '15 at 21:30
  • 1
    $\begingroup$ @Resanrom, posted the comment as an answer. $\endgroup$
    – kglr
    Apr 16 '15 at 21:35
1
$\begingroup$
ListLogLinearPlot[data1, Joined -> True, PlotStyle -> Dotted, 
   PlotLegends -> LineLegend[{"data"}]]
$\endgroup$

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.