The first image is how the text annotation is required, the second image is what I am getting. There appears to be no method to rotate the text in Scatter plot. What option do I have wherein I can get a line at the point just like shown below as well as rotate the annotation?
The code:
fig = go.Figure()
#Epoch 2005
fig.add_traces(
go.Scatter(
name = '2005',
x = Wav8071205,
y = Int8071205
)
)
#Epoch 2006
fig.add_traces(
go.Scatter(
name = '2006',
x = Wav8101006,
y = Int8101006
)
)
#Epoch 2007
fig.add_traces(
go.Scatter(
name = '2007',
x = Wav8110107,
y = Int8110107
)
)
#Epoch New
fig.add_traces(
go.Scatter(
name = 'New',
x = Wav8fmcontr,
y = Int8fmcontr
)
)
#Add Lines with Wavelength
fig.add_traces(
go.Scatter(
x = [6563,8498, 8542, 8662],
y = [-3,-3,-3,-3],
mode="markers+text",
marker_symbol = 'line-ns',
marker_line_width=2, marker_size=20,
text = ['H alpha','CaII a','CaII b','CaII c'],
textposition = 'bottom center'
)
)
fig.update_layout(
title = 'Grism 8 Spectra',
yaxis = dict(
range=[-10,35]
)
)
fig.show()