Hello,
My goal is to have a base map and plot scatter points on it. For some reason, when using go.Image and setting the x and y, the image range is bigger than the true coordinates. Thus,
I am using secondary x and y coordinates to plot the scatter points in the correct place.
However, the image is not plotted with the code below. Thanks in advance!
im = Image.open("preload2.jpg")
np_im = np.array(im)
im.close()
fig = go.Figure()
fig.add_trace(go.Image(z = np_im ,
x0 = x_left,
y0 = y_top,
yaxis = 'y',
xaxis = 'x' ))
fig.add_trace(go.Scatter( x = df_geo['Easting (ft)'],
y = df_geo['Northing (ft)'],
mode = 'markers',
marker = dict( color = '#3292EA',
size = 5,
symbol = "circle"),
yaxis = 'y2',
xaxis = 'x2' ))
fig.update_layout( xaxis = dict (showticklabels = False),
yaxis = dict (showticklabels = False),
xaxis2 = dict (range = [BBox[0],BBox[1] ],
linecolor = 'red',
side = 'top'
),
yaxis2 = dict (range = [BBox[2],BBox[3] ],
linecolor = 'red' ,
side = 'right'
)
)
fig.show()