Message Boards Message Boards

0
|
4380 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

ListLinePlot has its own mind regarding AxesOrigin

Posted 10 years ago

I have a long code for a ListLinePlot in its own cell. I have this code in two notebooks. In one of them the code displays correctly the AxesOrigin at {0.0,0.0}. In the other it is not doing it correctly but rather it is displaying the "important area" what it thinks is important. I am executing both notebooks on the same machine in the same session and I changed their execution order with no change in behavior. I re-copied the "good" code into the "bad" notebook, but the behavior remained the same. The only difference that the two notebooks work with different set of data, where the number of datapoints are the same, but the values are different. Very strange. I quite kernels, quit Frontend, but the behavior of ListLinePlot remains the same, one notebook shows correctly the AxesOrigin, the same code in the other notebook does not. I attache two pictures showing the output in the two notebook.

ListLinePlot[{{{mas100*pixelScale/1000., 
     mofmpsannuli100Limit[[
      First[First[
        Position[mofmpsannuli200Limit, 
         Max[mofmpsannuli200Limit] ] ] ]]]}, {mas200*pixelScale/1000.,
      mofmpsannuli200Limit[[
      First[First[
        Position[mofmpsannuli200Limit, 
         Max[mofmpsannuli200Limit] ] ] ]]]}, {mas400*pixelScale/1000.,
      mofmpsannuli400Limit[[
      First[First[
        Position[mofmpsannuli200Limit, 
         Max[mofmpsannuli200Limit] ] ] ]]]}, {mas600*pixelScale/1000.,
      mofmpsannuli600Limit[[
      First[First[
        Position[mofmpsannuli200Limit, 
         Max[mofmpsannuli200Limit] ] ] ]]]}, {mas800*pixelScale/1000.,
      mofmpsannuli800Limit[[
      First[First[
        Position[mofmpsannuli200Limit, 
         Max[mofmpsannuli200Limit] ] ] ]]]}, {mas1000*pixelScale/1000,
      mofmpsannuli1000Limit[[
      First[First[
        Position[mofmpsannuli200Limit, 
         Max[mofmpsannuli200Limit] ] ] ]]]}}, {{mas100*
      pixelScale/1000., 
     mofmpsannuli100Limit[[
      First[First[
        Position[mofmpsannuli800Limit, 
         Max[mofmpsannuli800Limit] ] ] ]]]}, {mas200*pixelScale/1000.,
      mofmpsannuli200Limit[[
      First[First[
        Position[mofmpsannuli800Limit, 
         Max[mofmpsannuli800Limit] ] ] ]]]}, {mas400*pixelScale/1000.,
      mofmpsannuli400Limit[[
      First[First[
        Position[mofmpsannuli800Limit, 
         Max[mofmpsannuli800Limit] ] ] ]]]}, {mas600*pixelScale/1000.,
      mofmpsannuli600Limit[[
      First[First[
        Position[mofmpsannuli800Limit, 
         Max[mofmpsannuli800Limit] ] ] ]]]}, {mas800*pixelScale/1000.,
      mofmpsannuli800Limit[[
      First[First[
        Position[mofmpsannuli800Limit, 
         Max[mofmpsannuli800Limit] ] ] ]]]}, {mas1000*pixelScale/1000,
      mofmpsannuli1000Limit[[
      First[First[
        Position[mofmpsannuli800Limit, 
         Max[mofmpsannuli800Limit] ] ] ]]]}}, {{mas100*
      pixelScale/1000., 
     mofmpsannuli100Limit[[33]]}, {mas200*pixelScale/1000., 
     mofmpsannuli200Limit[[33]]}, {mas400*pixelScale/1000., 
     mofmpsannuli400Limit[[33]]}, {mas600*pixelScale/1000., 
     mofmpsannuli600Limit[[33]]}, {mas800*pixelScale/1000., 
     mofmpsannuli800Limit[[33]]}, {mas1000*pixelScale/1000, 
     mofmpsannuli1000Limit[[33]]}}, {{mas100*pixelScale/1000., -2.5*
      Log10[Mean[annuli100pFull[[All, 3]] ] + 
        5*If[Length[annuli100pFull] > 1, 
          StandardDeviation[annuli100pFull[[All, 3]] ], 
          0 ]]}, {mas200*pixelScale/1000., -2.5*
      Log10[Mean[annuli200pFull[[All, 3]] ] + 
        5*If[Length[annuli200pFull] > 1, 
          StandardDeviation[annuli200pFull[[All, 3]] ], 
          0 ]]}, {mas400*pixelScale/1000., -2.5*
      Log10[Mean[annuli400pFull[[All, 3]] ] + 
        5*If[Length[annuli400pFull] > 1, 
          StandardDeviation[annuli400pFull[[All, 3]] ], 
          0 ]]}, {mas600*pixelScale/1000., -2.5*
      Log10[Mean[annuli600pFull[[All, 3]] ] + 
        5*If[Length[annuli600pFull] > 1, 
          StandardDeviation[annuli600pFull[[All, 3]] ], 
          0 ]]}, {mas800*pixelScale/1000., -2.5*
      Log10[Mean[annuli800pFull[[All, 3]] ] + 
        5*If[Length[annuli800pFull] > 1, 
          StandardDeviation[annuli800pFull[[All, 3]] ], 
          0 ]]}, {mas1000*pixelScale/1000, -2.5*
      Log10[Mean[annuli1000pFull[[All, 3]] ] + 
        5*If[Length[annuli1000pFull] > 1, 
          StandardDeviation[annuli1000pFull[[All, 3]] ], 0 ]]}}},    AxesOrigin -> {0.0, 0.0},    AxesLabel -> {Style["Separation from\ncentral star in [arcsec]", 
     16], Style["Magnitude \ndifference", 16]}, PlotRange -> All,    PlotLabel ->     Style["Best Non-detection limit lines with sub-stacks\n at 0.2 \ arcsec and 0.8 arcsec separations from the central star.\n The whole \ stack limit line is also shown\n and the line of the one closest to \ Shannon entropy. \nThe corresponding Rényi alphas are at the Legends",
     16], PlotLegends ->     Placed[{ToString[
      0.2 -> Flatten[
          Position[mofmpsannuli200Limit, Max[mofmpsannuli200Limit] ], 
          1 ] *0.03 + 0.001], 
     ToString[
      0.8 -> Flatten[
          Position[mofmpsannuli800Limit, Max[mofmpsannuli800Limit] ], 
          1 ] *0.03 + 0.001], "Closest \nto Shannon->{0.991}", 
     "Full Stack"}, Right], PlotMarkers -> {Automatic, 10},    ImageSize -> Large]

Data in first case is:

{{{0.1, 3.1062}, {0.2, 3.42768}, {0.4, 4.13888}, {0.6, 4.47292}, {0.8, 5.04849}, {1., 5.10432}}, {{0.1, 3.17095}, {0.2, 3.29951}, {0.4, 4.08047}, {0.6, 4.47439}, {0.8, 5.11025}, {1., 5.21767}}, {{0.1, 3.20472}, {0.2, 3.28093}, {0.4, 4.23267}, {0.6, 4.50382}, {0.8, 5.06543}, {1., 5.23638}}, {{0.1, 3.88258}, {0.2, 3.48576}, {0.4, 4.22446}, {0.6, 4.58601}, {0.8, 5.07973}, {1., 5.13166}}}

In the second case:

{{{0.1, 3.1062}, {0.2, 3.42768}, {0.4, 4.13888}, {0.6, 4.47292}, {0.8, 5.04849}, {1., 5.10432}}, {{0.1, 3.17095}, {0.2, 3.29951}, {0.4, 4.08047}, {0.6, 4.47439}, {0.8, 5.11025}, {1., 5.21767}}, {{0.1, 3.20472}, {0.2, 3.28093}, {0.4, 4.23267}, {0.6, 4.50382}, {0.8, 5.06543}, {1., 5.23638}}, {{0.1, 3.88258}, {0.2, 3.48576}, {0.4, 4.22446}, {0.6, 4.58601}, {0.8, 5.07973}, {1., 5.13166}}}

Attachments:
POSTED BY: Janos Lobb

Hi Janos,

Just make sure you have the PlotRange set to some particular value (e.g. PlotRange -> {0,3}) and the AxesOrigin is visible is within that PlotRange. Do you have a minimum working example with explicit data? so we can try thing out?

Just select the first argument of your command and right-click and choose: evaluate expression.

--SH

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract