Is there a way to change axes on scatter graph? let's say move the axis from (0,0) i.e (zero-line) to something like (3,3) and make a quadrant graph
I've tried setting the "zeroline" value on both "xaxis" and "yaxis" to False and then drawing two constant lines across both the axes from 'shapes'. But I'd want to know if there's any way to change the origin axes.
Here's the example in the image
import plotly.graph_objs as go
import plotly
import plotly.io as pio
trace0 = go.Scatter(
x=[7],
y=[7.5],
)
data = [trace0]
layout = {
'xaxis': {
'zeroline': False,
'dtick': 1,
},
'yaxis': {
'zeroline': False,
'dtick': 1,
},
'shapes': [
{
'type': 'line',
'x0': 5,
'y0': 0,
'x1': 5,
'y1': 10,
'line': {
'width': 1,
},
},
{
'type': 'line',
'x0': 0,
'y0': 5,
'x1': 10,
'y1': 5,
'line': {
'width': 1
},
},
]
}
fig = {
'data': data,
'layout': layout,
}
plotly.offline.plot(fig)
pio.write_image(fig, 'images/test.png')