# Difficulty producing Contour plots of multidimensional data, with x-values different for each time step

**URL:** <https://discourse.julialang.org/t/difficulty-producing-contour-plots-of-multidimensional-data-with-x-values-different-for-each-time-step/61560>\
**Category:** Visualization\
**Tags:** plotting\
**Created:** [May 21, 2021, 7:18am UTC](https://discourse.julialang.org/t/difficulty-producing-contour-plots-of-multidimensional-data-with-x-values-different-for-each-time-step/61560 "2021-05-21T07:18:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CosmoProf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cosmoprof/32/15516_2.png) [@CosmoProf](https://discourse.julialang.org/u/CosmoProf)\
**Post date:** [May 21, 2021, 7:18am UTC](https://discourse.julialang.org/t/difficulty-producing-contour-plots-of-multidimensional-data-with-x-values-different-for-each-time-step/61560/1 "2021-05-21T07:18:47Z")

</div>

Hi, I have a set of 2-dimensional data, defined over an array of timesteps, but at each timestep the position x-values are different. I’m trying to get contour plots, but the plots come up blank, and each time I get the error message: `Arrays have incorrect length or dimension.` An example code excerpt goes like:

```julia
using Plots

tNum = 4; xNum = 3;

FunctionForPlot = Array{Float64,2}(undef, tNum, xNum)
xValsArr = Array{Float64,2}(undef, tNum, xNum)
tValsArr = Array{Float64}(undef, tNum)

for i in 1:tNum
        tValsArr[i] = i
    for j in 1:xNum
        xValsArr[i,j] = i + j^2
        FunctionForPlot[i,j] = i*sin(35*j)
    end
end

contour([xValsArr[i,j] for i=1:tNum, j=1:xNum],
         [tValsArr[i] for i=1:tNum, j=1:xNum],
        [FunctionForPlot[i,j] for i=1:tNum, j=1:xNum], fill=true)

```

Any suggestions on how to make this work, or why I’m not getting the plot I expected, would be welcome. Thank you!
