1
$\begingroup$

I was trying to make a ListContourPlot of some data. I have triplets of data of the form {x, y, f[x, y]}. A part of this data is the following:

table={{0.2, -7.*10^-9, 0.987445}, {0.2, -6.8*10^-9, 
0.987161}, {0.2, -6.6*10^-9, 0.986873}, {0.2, -6.4*10^-9, 
0.986583}, {0.2, -6.2*10^-9, 0.986289}, {0.2, -6.*10^-9, 
0.985992}, {0.2, -5.8*10^-9, 0.985692}, {0.2, -5.6*10^-9, 
0.985389}, {0.2, -5.4*10^-9, 0.985083}, {0.2, -5.2*10^-9, 
0.984773}, {0.2, -5.*10^-9, 0.984461}, {0.2, -4.8*10^-9, 
0.984145}, {0.2, -4.6*10^-9, 0.983827}, {0.2, -4.4*10^-9, 
0.983505}, {0.2, -4.2*10^-9, 0.98318}, {0.2, -4.*10^-9, 
0.982852}, {0.2, -3.8*10^-9, 0.982521}, {0.2, -3.6*10^-9, 
0.982187}, {0.2, -3.4*10^-9, 0.98185}, {0.2, -3.2*10^-9, 
0.98151}, {0.2, -3.*10^-9, 0.981167}, {0.2, -2.8*10^-9, 
0.980821}, {0.2, -2.6*10^-9, 0.980471}, {0.2, -2.4*10^-9, 
0.980119}, {0.2, -2.2*10^-9, 0.979763}, {0.2, -2.*10^-9, 
0.979405}, {0.3, -7.*10^-9, 0.991915}, {0.3, -6.8*10^-9, 
0.991569}, {0.3, -6.6*10^-9, 0.991217}, {0.3, -6.4*10^-9, 
0.990858}, {0.3, -6.2*10^-9, 0.990491}, {0.3, -6.*10^-9, 
0.990117}, {0.3, -5.8*10^-9, 0.989737}, {0.3, -5.6*10^-9, 
0.989349}, {0.3, -5.4*10^-9, 0.988954}, {0.3, -5.2*10^-9, 
0.988552}, {0.3, -5.*10^-9, 0.988143}, {0.3, -4.8*10^-9, 
0.987727}, {0.3, -4.6*10^-9, 0.987303}, {0.3, -4.4*10^-9, 
0.986873}, {0.3, -4.2*10^-9, 0.986436}, {0.3, -4.*10^-9, 
0.985992}, {0.3, -3.8*10^-9, 0.985541}, {0.3, -3.6*10^-9, 
0.985083}, {0.3, -3.4*10^-9, 0.984617}, {0.3, -3.2*10^-9, 
0.984145}, {0.3, -3.*10^-9, 0.983666}, {0.3, -2.8*10^-9, 
0.98318}, {0.3, -2.6*10^-9, 0.982687}, {0.3, -2.4*10^-9, 
0.982187}, {0.3, -2.2*10^-9, 0.981681}, {0.3, -2.*10^-9, 
0.981167}, {0.4, -7.*10^-9, 0.995414}, {0.4, -6.8*10^-9, 
0.995063}, {0.4, -6.6*10^-9, 0.9947}, {0.4, -6.4*10^-9, 
0.994324}, {0.4, -6.2*10^-9, 0.993935}, {0.4, -6.*10^-9, 
0.993534}, {0.4, -5.8*10^-9, 0.99312}, {0.4, -5.6*10^-9, 
0.992692}, {0.4, -5.4*10^-9, 0.992253}, {0.4, -5.2*10^-9, 
0.9918}, {0.4, -5.*10^-9, 0.991335}, {0.4, -4.8*10^-9, 
0.990858}, {0.4, -4.6*10^-9, 0.990367}, {0.4, -4.4*10^-9, 
0.989864}, {0.4, -4.2*10^-9, 0.989349}, {0.4, -4.*10^-9, 
0.988821}, {0.4, -3.8*10^-9, 0.98828}, {0.4, -3.6*10^-9, 
0.987727}, {0.4, -3.4*10^-9, 0.987161}, {0.4, -3.2*10^-9, 
0.986583}, {0.4, -3.*10^-9, 0.985992}, {0.4, -2.8*10^-9, 
0.985389}, {0.4, -2.6*10^-9, 0.984773}, {0.4, -2.4*10^-9, 
0.984145}, {0.4, -2.2*10^-9, 0.983505}, {0.4, -2.*10^-9, 
0.982852}, {0.5, -7.*10^-9, 0.997932}, {0.5, -6.8*10^-9, 
0.997633}, {0.5, -6.6*10^-9, 0.997313}, {0.5, -6.4*10^-9, 
0.996974}, {0.5, -6.2*10^-9, 0.996614}}

ListContourPlot[table, PlotLegends -> Automatic, 
PlotRange -> Automatic]

But I get a totally blank area, absolutely nothing. Do you have any suggestion?

$\endgroup$
5
$\begingroup$

The second coordinate is tiny! Try scaling it to order 1:

scaledYTable = table /. {x_, y_, f_} :> {x, 10^9 y, f};
ListContourPlot[
  scaledYTable
  , PlotLegends -> Automatic
  , PlotRange -> Automatic
]

Working ListContourPlot

$\endgroup$
4
  • 1
    $\begingroup$ You can also use the option ScalingFunctions -> {None, {10^9 # &, 10^-9 # &}, None} (+1) $\endgroup$
    – kglr
    Sep 9 '20 at 16:19
  • $\begingroup$ @kglr That's a much better method than mine! (because it scales the second coordinate without having to touch the data.) Could you turn it into an answer? $\endgroup$
    – yawnoc
    Sep 9 '20 at 16:59
  • $\begingroup$ thank you! I'm analyzing other data, I will try this when it will stop running! $\endgroup$
    – Orion
    Sep 10 '20 at 9:07
  • $\begingroup$ If I put ScalingFunctions in ListContourPlot it gives me a red word $\endgroup$
    – Orion
    Sep 10 '20 at 15:56

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.