Skip to main content

DataRange seems to destroy your scaling so let's get proper frame by overlaying oryginal one:

dataZ = RandomReal[{1, 5}, {10, 10}];
scaleTheDomainBy10To[bx_, by_] := Module[{data1, range, range1},
   data =  Flatten[Table[{x*10^(bx - 1), y*10^(by - 1), dataZ[[x, y]]}, 
                         {x, 1, 10}, {y, 1, 10}], 1];
   data1 = data;
   data1[[;; , ;; 2]] = Standardize[data1[[;; , ;; 2]]];
   range = N@Through[{Min, Max}@#] & /@ Transpose[data[[;; , ;; 2]]];
   range1 = N@Through[{Min, Max}@#] & /@ Transpose[data1[[;; , ;; 2]]];

   With[{
     opt = Sequence[ImageSize -> 250, ImagePadding -> {{50, 515}, {1530, 515}}, 
                    AspectRatio -> 1, Frame -> True, PlotLabel -> {bx, by}]
     },
    Overlay[{
      ListContourPlot[data1, opt, FrameStyle -> White]Transparent, PlotRange -> range1],
      ListPlot[data[[;; , ;; 2]], FrameStyle -> Black, opt]opt, PlotRange -> range]
      }]]
   ];

Grid[{{scaleTheDomainBy10To[3, 0], scaleTheDomainBy10To[3.5, 0], 
       scaleTheDomainBy10To[4, 0]}, {scaleTheDomainBy10To[0, -3], 
       scaleTheDomainBy10To[0, -3.5], scaleTheDomainBy10To[0, -4]}}]

enter image description hereenter image description here

DataRange seems to destroy your scaling so let's get proper frame by overlaying oryginal one:

dataZ = RandomReal[{1, 5}, {10, 10}];
scaleTheDomainBy10To[bx_, by_] := Module[{data1, range},
   data =  Flatten[Table[{x*10^(bx - 1), y*10^(by - 1), dataZ[[x, y]]}, 
                         {x, 1, 10}, {y, 1, 10}], 1];
   data1 = data;
   data1[[;; , ;; 2]] = Standardize[data1[[;; , ;; 2]]];

   With[{
     opt = Sequence[ImageSize -> 250, ImagePadding -> {{50, 5}, {15, 5}}, 
                    AspectRatio -> 1, Frame -> True, PlotLabel -> {bx, by}]
     },
    Overlay[{
      ListContourPlot[data1, opt, FrameStyle -> White],
      ListPlot[data[[;; , ;; 2]], FrameStyle -> Black, opt]
      }]]
   ];

Grid[{{scaleTheDomainBy10To[3, 0], scaleTheDomainBy10To[3.5, 0], 
       scaleTheDomainBy10To[4, 0]}, {scaleTheDomainBy10To[0, -3], 
       scaleTheDomainBy10To[0, -3.5], scaleTheDomainBy10To[0, -4]}}]

enter image description here

DataRange seems to destroy your scaling so let's get proper frame by overlaying oryginal one:

dataZ = RandomReal[{1, 5}, {10, 10}];
scaleTheDomainBy10To[bx_, by_] := Module[{data1, range, range1},
   data =  Flatten[Table[{x*10^(bx - 1), y*10^(by - 1), dataZ[[x, y]]}, 
                         {x, 1, 10}, {y, 1, 10}], 1];
   data1 = data;
   data1[[;; , ;; 2]] = Standardize[data1[[;; , ;; 2]]];
   range = N@Through[{Min, Max}@#] & /@ Transpose[data[[;; , ;; 2]]];
   range1 = N@Through[{Min, Max}@#] & /@ Transpose[data1[[;; , ;; 2]]];

   With[{
     opt = Sequence[ImageSize -> 250, ImagePadding -> {{50, 15}, {30,15}}, 
                    AspectRatio -> 1, Frame -> True, PlotLabel -> {bx, by}]
     },
    Overlay[{
      ListContourPlot[data1, opt, FrameStyle -> Transparent, PlotRange -> range1],
      ListPlot[data[[;; , ;; 2]], FrameStyle -> Black, opt, PlotRange -> range]
      }]]
   ];

Grid[{{scaleTheDomainBy10To[3, 0], scaleTheDomainBy10To[3.5, 0], 
       scaleTheDomainBy10To[4, 0]}, {scaleTheDomainBy10To[0, -3], 
       scaleTheDomainBy10To[0, -3.5], scaleTheDomainBy10To[0, -4]}}]

enter image description here

Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751

DataRange seems to destroy your scaling so let's get proper frame by overlaying oryginal one:

dataZ = RandomReal[{1, 5}, {10, 10}];
scaleTheDomainBy10To[bx_, by_] := Module[{data1, range},
   data =  Flatten[Table[{x*10^(bx - 1), y*10^(by - 1), dataZ[[x, y]]}, 
                         {x, 1, 10}, {y, 1, 10}], 1];
   data1 = data;
   data1[[;; , ;; 2]] = Standardize[data1[[;; , ;; 2]]];

   With[{
     opt = Sequence[ImageSize -> 250, ImagePadding -> {{50, 5}, {15, 5}}, 
                    AspectRatio -> 1, Frame -> True, PlotLabel -> {bx, by}]
     },
    Overlay[{
      ListContourPlot[data1, opt, FrameStyle -> White],
      ListPlot[data[[;; , ;; 2]], FrameStyle -> Black, opt]
      }]]
   ];

Grid[{{scaleTheDomainBy10To[3, 0], scaleTheDomainBy10To[3.5, 0], 
       scaleTheDomainBy10To[4, 0]}, {scaleTheDomainBy10To[0, -3], 
       scaleTheDomainBy10To[0, -3.5], scaleTheDomainBy10To[0, -4]}}]

enter image description here