Drawing rectangles using list of list

Hi All,

I want to draw a plot with rectangles for data source as list of list. The plot should look like belowimage

Below is the code for generating the data.

x = 10
y = 4
x_plist = []
y_plist = []
for i in range(-x,x):
    for j in range(-y,y):
        x_plist.append([i, i, i+1, i+1])
        y_plist.append([j, j+1, j+1, j])


Please let me know how to achieve the above plot

I plotted such a grid, but not as list of lists, because it involves plotting each segment in the grid.
My code below draws lines between points on the plot boundary:

import numpy as np
import plotly.graph_objects as go

m = 4
x, y=np.linspace(-m, m, 2*m+1), np.linspace(-n,n, 2*n+1)
nx = [None]*len(x)
ny = [None]*len(y)
X = [*sum(zip(x,x, nx),())]+[-m, m, None] *(2*n+1)
Y = [-n, n, None]*(2*m+1)  + [*sum(zip(y,y, ny),())]

fig= go.Figure()
fig.add_scatter(x=X, y=Y, mode='lines', line_color='rgb(100,100,100)', line_width=1.5)
fig.update_layout(template='none', xaxis_visible=False, yaxis_visible=False, 
                  width=500, height=600, plot_bgcolor='rgba(255,127,80, 0.45)', 
                  xaxis_range=[-m, m], yaxis_range=[-n, n])

@empet Thanks for the help