{"id":8706,"date":"2022-10-14T03:57:32","date_gmt":"2022-10-13T20:57:32","guid":{"rendered":"https:\/\/www.phidgets.com\/education\/?page_id=8706"},"modified":"2022-10-18T05:13:05","modified_gmt":"2022-10-17T22:13:05","slug":"plotly","status":"publish","type":"page","link":"https:\/\/www.phidgets.com\/education\/learn\/projects\/plotly\/","title":{"rendered":"Plotly"},"content":{"rendered":"<p>[et_pb_section bb_built=&#8221;1&#8243; specialty=&#8221;off&#8221; next_background_color=&#8221;#000000&#8243; _builder_version=&#8221;4.4.1&#8243; custom_padding=&#8221;||0px|&#8221; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_row _builder_version=&#8221;4.4.1&#8243; use_custom_gutter=&#8221;on&#8221; gutter_width=&#8221;3&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column type=&#8221;1_2&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221;][et_pb_code admin_label=&#8221;Plotly Basics&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221;]<\/p>\n<div class=\"ph-overline-text\"><!-- [et_pb_line_break_holder] -->    <a href=\"\/education\/learn\/projects\">Projects<\/a><!-- [et_pb_line_break_holder] -->    <\/div>\n<p><!-- [et_pb_line_break_holder] --><\/p>\n<h1>Visualize Data with Plotly<\/h1>\n<p>[\/et_pb_code][et_pb_code admin_label=&#8221;Description&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221;]<pee>Try using Plotly with Python to visualize your Phidgets data!<\/pee>[\/et_pb_code][et_pb_code admin_label=&#8221;ph-button-cta: Start&#8221; _builder_version=&#8221;4.4.1&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<a class=\"ph-button-cta\" href=\"#setup\"><!-- [et_pb_line_break_holder] -->  <\/p>\n<div class=\"ph-button-cta__icon\"><\/div>\n<p><!-- [et_pb_line_break_holder] -->  Start<!-- [et_pb_line_break_holder] --><\/a>[\/et_pb_code][\/et_pb_column][et_pb_column type=&#8221;1_2&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221;][et_pb_image _builder_version=&#8221;4.18.0&#8243; src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2022\/10\/plotly_phidgets.jpg&#8221; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221; \/][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section bb_built=&#8221;1&#8243; specialty=&#8221;on&#8221; _builder_version=&#8221;4.4.1&#8243; use_custom_gutter=&#8221;on&#8221; gutter_width=&#8221;3&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; prev_background_color=&#8221;#000000&#8243;][et_pb_column type=&#8221;1_4&#8243;][et_pb_code admin_label=&#8221;ph-vertical-nav&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; saved_tabs=&#8221;all&#8221; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221;]<\/p>\n<div class=\"ph-vertical-nav ph-vertical-sticky\"><!-- [et_pb_line_break_holder] -->  <a href=\"#prereq\" class=\"ph-vertical-nav-item\">Prerequisites<\/a><!-- [et_pb_line_break_holder] -->  <a href=\"#setup\" class=\"ph-vertical-nav-item\">Setup<\/a><!-- [et_pb_line_break_holder] -->  <a href=\"#install\" class=\"ph-vertical-nav-item\">Install<\/a><!-- [et_pb_line_break_holder] -->  <a href=\"#write-code\" class=\"ph-vertical-nav-item\">Write Code<\/a><!-- [et_pb_line_break_holder] -->  <a href=\"#run-code\" class=\"ph-vertical-nav-item\">Run Program<\/a><!-- [et_pb_line_break_holder] -->  <a href=\"#practice\" class=\"ph-vertical-nav-item\">Practice<\/a><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][\/et_pb_column][et_pb_column type=&#8221;3_4&#8243; specialty_columns=&#8221;3&#8243;][et_pb_row_inner _builder_version=&#8221;4.6.6&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_id=&#8221;prereq&#8221;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_code admin_label=&#8221;Prerequisites&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_id=&#8221;setup&#8221; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221;]<\/p>\n<h2>Prerequisites<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>This project assumes you are familiar with the following<\/pee><!-- [et_pb_line_break_holder] --><\/p>\n<ul><!-- [et_pb_line_break_holder] --><\/p>\n<li><a href=\"\/education\/learn\/getting-started-kit-tutorial\/dataevents_4\/\" target=\"_blank\" rel=\"noopener noreferrer\">Getting Started Kit &#8211; Advanced Lessons &#8211; Data Interval<\/a><\/li>\n<p><!-- [et_pb_line_break_holder] --><\/ul>\n<p>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner _builder_version=&#8221;4.6.6&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_id=&#8221;setup&#8221;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_code admin_label=&#8221;Setup&#8221; _builder_version=&#8221;4.6.6&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_id=&#8221;setup&#8221;]<\/p>\n<h2>Setup<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>All you need for this project is the Getting Started Kit.<\/strong><\/pee>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner _builder_version=&#8221;4.4.1&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; custom_padding=&#8221;||0px|&#8221;][et_pb_column_inner type=&#8221;1_3&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_code admin_label=&#8221;Part: GSK&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; saved_tabs=&#8221;all&#8221; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221; global_module=&#8221;8489&#8243;]<\/p>\n<div class=\"ph-part-card\"><!-- [et_pb_line_break_holder] -->  <\/p>\n<div class=\"ph-part-card__top\"><!-- [et_pb_line_break_holder] -->    <\/p>\n<div class=\"ph-part-card__type\"><!-- [et_pb_line_break_holder] -->      <\/p>\n<div class=\"ph-overline-text\"><!-- [et_pb_line_break_holder] -->        <a href=\"\">Kit\/<\/a><!-- [et_pb_line_break_holder] -->        <a href=\"\">Getting Started Kit<\/a><!-- [et_pb_line_break_holder] -->      <\/div>\n<p><!-- [et_pb_line_break_holder] -->    <\/div>\n<p><!-- [et_pb_line_break_holder] -->    <\/p>\n<div class=\"ph-part-card__title\"><!-- [et_pb_line_break_holder] -->      <\/p>\n<h3>Getting Started Kit<\/h3>\n<p><!-- [et_pb_line_break_holder] -->    <\/div>\n<p><!-- [et_pb_line_break_holder] -->  <\/div>\n<p><!-- [et_pb_line_break_holder] -->  <\/p>\n<div class=\"ph-part-card__bottom\"><!-- [et_pb_line_break_holder] -->    <img decoding=\"async\" src=\"\/education\/wp-content\/uploads\/2022\/08\/KIT4003_2_Square.jpg\" ><!-- [et_pb_line_break_holder] -->  <\/div>\n<p><!-- [et_pb_line_break_holder] --><\/div>\n<p>[\/et_pb_code][\/et_pb_column_inner][et_pb_column_inner type=&#8221;1_3&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][\/et_pb_column_inner][et_pb_column_inner type=&#8221;1_3&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner _builder_version=&#8221;4.4.1&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; custom_padding=&#8221;||0px|&#8221;][et_pb_column_inner type=&#8221;1_3&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][\/et_pb_column_inner][et_pb_column_inner type=&#8221;1_3&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][\/et_pb_column_inner][et_pb_column_inner type=&#8221;1_3&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; module_id=&#8221;install&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_code admin_label=&#8221;Install&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_id=&#8221;install&#8221; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221;]<\/p>\n<h2>Install Plotly<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>In order to use Plotly, you first have to install it. You do this in the same way you previously installed the Phidget22 library. Simply navigate to your package manager,  search for <strong>plotly<\/strong> and press install!<\/pee>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.6.6&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; disabled=&#8221;off&#8221; disabled_on=&#8221;off|off|off&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;1_2&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_code admin_label=&#8221;Thonny&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221;]<\/p>\n<h3>Thonny<\/h3>\n<p><!-- [et_pb_line_break_holder] --><pee>If you&#8217;re using Thonny, select Tools > Manage Packages and search for plotly.<\/pee>[\/et_pb_code][\/et_pb_column_inner][et_pb_column_inner type=&#8221;1_2&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_image _builder_version=&#8221;4.18.0&#8243; src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2022\/10\/plotly_thonny.png&#8221; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; show_in_lightbox=&#8221;on&#8221; title_text=&#8221;Thonny&#8221; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221; \/][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.6.6&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; disabled=&#8221;off&#8221; disabled_on=&#8221;off|off|off&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;1_2&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_code admin_label=&#8221;PyCharm&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221;]<\/p>\n<h3>PyCharm<\/h3>\n<p><!-- [et_pb_line_break_holder] --><pee>If you&#8217;re using PyCharm, select File > Settings > Python Interpreter and use the <strong>+<\/strong> symbol to install plotly.<\/pee>[\/et_pb_code][\/et_pb_column_inner][et_pb_column_inner type=&#8221;1_2&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_image _builder_version=&#8221;4.18.0&#8243; src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2022\/10\/plotly_pycharm.png&#8221; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; show_in_lightbox=&#8221;on&#8221; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221; \/][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner admin_label=&#8221;Row&#8221; _builder_version=&#8221;4.6.6&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; disabled=&#8221;off&#8221; disabled_on=&#8221;off|off|off&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;1_2&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_code admin_label=&#8221;PyScripter&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221;]<\/p>\n<h3>PyScripter<\/h3>\n<p><!-- [et_pb_line_break_holder] --><pee>If you&#8217;re using PyScripter, select Tools > Tools > Install Packages with pip and enter plotly.<\/pee>[\/et_pb_code][\/et_pb_column_inner][et_pb_column_inner type=&#8221;1_2&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_image _builder_version=&#8221;4.18.0&#8243; src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2022\/10\/plotly_pyscripter.png&#8221; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; show_in_lightbox=&#8221;on&#8221; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221; \/][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner admin_label=&#8221;Row&#8221; disabled_on=&#8221;off|off|off&#8221; disabled=&#8221;off&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; module_id=&#8221;write-code&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_code admin_label=&#8221; (invisible anchor)&#8221; _builder_version=&#8221;4.4.1&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; module_id=&#8221;move&#8221; module_class=&#8221;ph-hidden-anchor&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; \/][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_code admin_label=&#8221;Write code Python&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<\/p>\n<h2>Write code (Python)<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>Copy the code below into a new Python project. If you need a reminder of how to do this, revisit the <a href=\"\/education\/learn\/getting-started-kit-tutorial\/configure-ide\">Getting Started Course.<\/a><!\u2013- [et_pb_br_holder] -\u2013><!\u2013- [et_pb_br_holder] -\u2013><!-- [et_pb_line_break_holder] -->Not your programming language? <a class=\"ph-toggle-settings\">Set your preferences<\/a> so we can display relevant code examples<\/pee>[\/et_pb_code][et_pb_code admin_label=&#8221;Code Sample&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221;]<\/p>\n<pre class=\"language-python\"><!-- [et_pb_line_break_holder] -->  <code><!-- [et_pb_line_break_holder] -->#Add Phidgets library<!-- [et_pb_line_break_holder] -->from Phidget22.Phidget import *<!-- [et_pb_line_break_holder] -->from Phidget22.Devices.TemperatureSensor import *<!-- [et_pb_line_break_holder] -->#Required for sleep statement<!-- [et_pb_line_break_holder] -->import time<!-- [et_pb_line_break_holder] -->#Required to plotly<!-- [et_pb_line_break_holder] -->import plotly.express as px<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->#Create<!-- [et_pb_line_break_holder] -->temperatureList = []<!-- [et_pb_line_break_holder] -->temperatureSensor = TemperatureSensor()<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->#Open<!-- [et_pb_line_break_holder] -->temperatureSensor.openWaitForAttachment(1000)<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->#Set data interval to minimum | This will increase the data rate from the sensor.<!-- [et_pb_line_break_holder] -->temperatureSensor.setDataInterval(temperatureSensor.getMinDataInterval())<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->#Use Your Phidgets to Collect Data<!-- [et_pb_line_break_holder] -->for i in range (10):<!-- [et_pb_line_break_holder] -->    temperatureList.append(temperatureSensor.getTemperature())<!-- [et_pb_line_break_holder] -->    print(temperatureList[i])<!-- [et_pb_line_break_holder] -->    #Sleep until new data is available. Divide by 1000 to convert from ms to seconds.<!-- [et_pb_line_break_holder] -->    time.sleep(temperatureSensor.getDataInterval()\/1000)<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->#Use plotly to visualize data<!-- [et_pb_line_break_holder] -->fig = px.scatter(y=temperatureList)<!-- [et_pb_line_break_holder] -->fig.show()<!-- [et_pb_line_break_holder] -->  <\/code><!-- [et_pb_line_break_holder] --><\/pre>\n<p>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner _builder_version=&#8221;4.6.6&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_id=&#8221;run-code&#8221;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_code admin_label=&#8221;Run Your Program&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221;]<\/p>\n<h2>Run Your Program<\/h2>\n<p><!-- [et_pb_line_break_holder] --><pee>Your program will capture 10 temperature samples and display a plot.<\/pee>[\/et_pb_code][et_pb_image _builder_version=&#8221;4.18.0&#8243; src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2022\/10\/plotly_example.png&#8221; show_in_lightbox=&#8221;on&#8221; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221; align=&#8221;center&#8221; width=&#8221;75%&#8221; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; \/][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner _builder_version=&#8221;4.4.1&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; module_id=&#8221;practice&#8221;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_code admin_label=&#8221;Practice&#8221; _builder_version=&#8221;4.18.0&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221;]<\/p>\n<h2>Practice<\/h2>\n<p><!-- [et_pb_line_break_holder] --><\/p>\n<ol><!-- [et_pb_line_break_holder] --><\/p>\n<li>View the <a href=\"https:\/\/plotly.com\/python\/line-and-scatter\/\">Plotly Documentation<\/a> and customize the appearance of your plot. Try to create a plot that looks like the one below:<\/li>\n<p><!-- [et_pb_line_break_holder] --><\/ol>\n<p>[\/et_pb_code][et_pb_image _builder_version=&#8221;4.18.0&#8243; src=&#8221;https:\/\/www.phidgets.com\/education\/wp-content\/uploads\/2022\/10\/plotly_adv.png&#8221; show_in_lightbox=&#8221;on&#8221; background_pattern_color=&#8221;rgba(0,0,0,0.2)&#8221; background_mask_color=&#8221;#ffffff&#8221; align=&#8221;center&#8221; width=&#8221;75%&#8221; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243; \/][\/et_pb_column_inner][\/et_pb_row_inner][et_pb_row_inner admin_label=&#8221;Row&#8221;][et_pb_column_inner type=&#8221;4_4&#8243; saved_specialty_column_type=&#8221;3_4&#8243; custom_padding__hover=&#8221;|||&#8221; custom_padding=&#8221;|||&#8221; saved_specialty_column_type=&#8221;3_4&#8243;][et_pb_code admin_label=&#8221;ph-button-cta: Back to Projects&#8221; _builder_version=&#8221;4.4.1&#8243; box_shadow_horizontal_tablet=&#8221;0px&#8221; box_shadow_vertical_tablet=&#8221;0px&#8221; box_shadow_blur_tablet=&#8221;40px&#8221; box_shadow_spread_tablet=&#8221;0px&#8221; vertical_offset_tablet=&#8221;0&#8243; horizontal_offset_tablet=&#8221;0&#8243; z_index_tablet=&#8221;0&#8243;]<a class=\"ph-button-cta\" href=\"\/education\/learn\/projects\"><!-- [et_pb_line_break_holder] -->  <\/p>\n<div class=\"ph-button-cta__icon\"><\/div>\n<p><!-- [et_pb_line_break_holder] -->  Back to Projects<!-- [et_pb_line_break_holder] --><\/a>[\/et_pb_code][\/et_pb_column_inner][\/et_pb_row_inner][\/et_pb_column][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>#Add Phidgets libraryfrom Phidget22.Phidget import *from Phidget22.Devices.TemperatureSensor import *#Required for sleep statementimport time#Required to plotlyimport plotly.express as px#CreatetemperatureList = []temperatureSensor = TemperatureSensor()#OpentemperatureSensor.openWaitForAttachment(1000)#Set data interval to minimum | This will increase the data rate from the sensor.temperatureSensor.setDataInterval(temperatureSensor.getMinDataInterval())#Use Your Phidgets to Collect Datafor i in range (10): temperatureList.append(temperatureSensor.getTemperature()) print(temperatureList[i]) #Sleep until new data is available. Divide by [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":842,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"<!-- wp:paragraph -->\r\n<p>This is an example page. It's different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:<\/p>\r\n<!-- \/wp:paragraph --><!-- wp:quote -->\r\n<blockquote class=\"wp-block-quote\">\r\n<p>Hi there! I'm a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like pi\u00f1a coladas. (And gettin' caught in the rain.)<\/p>\r\n<\/blockquote>\r\n<!-- \/wp:quote --><!-- wp:paragraph -->\r\n<p>...or something like this:<\/p>\r\n<!-- \/wp:paragraph --><!-- wp:quote -->\r\n<blockquote class=\"wp-block-quote\">\r\n<p>The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.<\/p>\r\n<\/blockquote>\r\n<!-- \/wp:quote --><!-- wp:paragraph -->\r\n<p>As a new WordPress user, you should go to <a href=\"https:\/\/www.phidgets.com\/education\/wp-admin\/\">your dashboard<\/a> to delete this page and create new pages for your content. Have fun!<\/p>\r\n<!-- \/wp:paragraph -->","_et_gb_content_width":"","footnotes":""},"class_list":["post-8706","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/8706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/comments?post=8706"}],"version-history":[{"count":10,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/8706\/revisions"}],"predecessor-version":[{"id":8765,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/8706\/revisions\/8765"}],"up":[{"embeddable":true,"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/pages\/842"}],"wp:attachment":[{"href":"https:\/\/www.phidgets.com\/education\/wp-json\/wp\/v2\/media?parent=8706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}