Import aph_objects as go import numpy as np x = x_rev = x # Line 1 y1 = y1_upper = y1_lower = y1_lower = y1_lower # Line 2 y2 = y2_upper = y2_lower = y2_lower = y2_lower # Line 3 圓 = 圓_upper = 圓_lower = 圓_lower = 圓_lower fig = go. update_layout ( annotations = annotations ) fig. append ( dict ( xref = 'paper', yref = 'paper', x = 0.5, y =- 0.1, xanchor = 'center', yanchor = 'top', text = 'Source: PewResearch Center & ' + 'Storytelling with data', font = dict ( family = 'Arial', size = 12, color = 'rgb(150,150,150)' ), showarrow = False )) fig. append ( dict ( xref = 'paper', yref = 'paper', x = 0.0, y = 1.05, xanchor = 'left', yanchor = 'bottom', text = 'Main Source for News', font = dict ( family = 'Arial', size = 30, color = 'rgb(37,37,37)' ), showarrow = False )) # Source annotations. format ( y_trace ), font = dict ( family = 'Arial', size = 16 ), showarrow = False )) # Title annotations. append ( dict ( xref = 'paper', x = 0.05, y = y_trace, xanchor = 'right', yanchor = 'middle', text = label + ' %'. update_layout ( xaxis = dict ( showline = True, showgrid = False, showticklabels = True, linecolor = 'rgb(204, 204, 204)', linewidth = 2, ticks = 'outside', tickfont = dict ( family = 'Arial', size = 12, color = 'rgb(82, 82, 82)', ), ), yaxis = dict ( showgrid = False, zeroline = False, showline = False, showticklabels = False, ), autosize = False, margin = dict ( autoexpand = False, l = 100, r = 20, t = 110, ), showlegend = False, plot_bgcolor = 'white' ) annotations = # Adding labels for y_trace, label, color in zip ( y_data, labels, colors ): # labeling the left_side of the plot annotations. Scatter ( x =, x_data ], y =, y_data ], mode = 'markers', marker = dict ( color = colors, size = mode_size ) )) fig. Scatter ( x = x_data, y = y_data, mode = 'lines', name = labels, line = dict ( color = colors, width = line_size ), connectgaps = True, )) # endpoints fig. Import aph_objects as go import numpy as np title = 'Main Source for News' labels = colors = mode_size = line_size = x_data = np. update_layout ( title = 'Average High and Low Temperatures in New York', xaxis_title = 'Month', yaxis_title = 'Temperature (degrees F)' ) fig. Scatter ( x = month, y = low_2000, name = 'Low 2000', line = dict ( color = 'royalblue', width = 4, dash = 'dot' ))) # Edit the layout fig. Scatter ( x = month, y = high_2000, name = 'High 2000', line = dict ( color = 'firebrick', width = 4, dash = 'dot' ))) fig. Scatter ( x = month, y = low_2007, name = 'Low 2007', line = dict ( color = 'royalblue', width = 4, dash = 'dash' ))) fig. Scatter ( x = month, y = high_2007, name = 'High 2007', line = dict ( color = 'firebrick', width = 4, dash = 'dash' ) # dash options include 'dash', 'dot', and 'dashdot' )) fig. Scatter ( x = month, y = low_2014, name = 'Low 2014', line = dict ( color = 'royalblue', width = 4 ))) fig. Scatter ( x = month, y = high_2014, name = 'High 2014', line = dict ( color = 'firebrick', width = 4 ))) fig. It does not store any personal data.Import aph_objects as go # Add data month = high_2000 = low_2000 = high_2007 = low_2007 = high_2014 = low_2014 = fig = go. The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. The cookie is used to store the user consent for the cookies in the category "Performance". This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. The cookies is used to store the user consent for the cookies in the category "Necessary". The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". The cookie is used to store the user consent for the cookies in the category "Analytics". These cookies ensure basic functionalities and security features of the website, anonymously. Necessary cookies are absolutely essential for the website to function properly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |