1/31/2024 0 Comments All shapesshow ()ĭrawing shapes with a Mouse on Cartesian plots ¶ update_yaxes ( range =, zeroline = False, ) # Add shapes fig. update_xaxes ( range =, zeroline = False, ) fig. Scatter ( x =, y =, text =, mode = "text", )) # Update axes properties fig. Figure () # Create scatter trace of text labels fig. add_vrect ( x0 = "", x1 = "", fillcolor = "LightSalmon", opacity = 0.5, layer = "below", line_width = 0, ) fig. add_vrect ( x0 = "", x1 = "", fillcolor = "LightSalmon", opacity = 0.5, layer = "below", line_width = 0, ), fig. Scatter ( x =, y =, mode = "lines", name = "temperature" )) # Add shape regions fig. ![]() Figure () # Add scatter trace for line fig. Traces also support optional text, although there is a textual equivalent to shapes in text annotations.Traces cannot be positioned absolutely but can be positioned relative to date coordinates in any subplot type.Shapes can be positioned absolutely or relative to data coordinates in 2d cartesian subplots only.Traces can optionally support hover labels and can appear in legends.The differences between these two approaches are that: Note: there are special methods add_hline, add_vline, add_hrect and add_vrect for the common cases of wanting to draw horizontal or vertical lines or rectangles that are fixed to data coordinates in one axis and absolutely positioned in another. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |