Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

unit 4 dvp

Rating
-
Sold
-
Pages
22
Uploaded on
19-04-2026
Written in
2025/2026

Stop depending on scattered materials and last-minute confusion. Get professionally prepared, exam-focused DVP notes designed to help you understand faster and score higher. These are not ordinary notes — they are carefully structured for maximum results. ️ Complete coverage of UNIT I – UNIT V (JNTUH R22 syllabus) ️ Concept clarity + exam-oriented explanation ️ Includes important questions, repeated topics & key answers ️ Well-written Python programs (Matplotlib, Seaborn, Pandas) ️ Designed for quick revision before exams ️ Saves hours of preparation time Perfect for students who want smart preparation instead of hard preparation Ideal for: B.Tech IT / AI & DS students Format: साफ & well-organized PDF / Printed notes Premium Quality at an Affordable Price Contact: Archana

Show more Read less
Institution
Course

Content preview

UNIT-4
Plotly and JSON
Syllabus:Plotly and JSON, Online and Offline plotting, Structure of Plotly Plot, Graph
Objectives VS Dictionaries, Plotly Express, updating plots- Adding and Updating Traces,
Creating Subplots, DropDown Menus, Dash Interactivity, Example Plots

Plotly and JSON

Plotly is a powerful open-source data visualization library used for creating interactive graphs
and dashboards in Python, R, and JavaScript. One of the most important aspects of Plotly is
that every visualization created by Plotly is internally represented using JSON (JavaScript
Object Notation).

JSON is a lightweight data-interchange format that organizes information as key–value pairs.
Plotly uses this structure to store all components of a graph such as data, layout, axes,
legends, colors, and animations.

A Plotly graph usually contains three main JSON components:

1. Data
This contains the graphical representation of the dataset such as bars, scatter points, or
lines. Each dataset in Plotly is called a trace.
2. Layout
This defines the design of the chart including titles, axis labels, legend position,
colors, margins, and background style.
3. Frames (Optional)
Frames are used when creating animations in Plotly.

Thus, when a Plotly graph is created, Python converts the graph into a JSON structure,
which the browser reads and renders as an interactive visualization.

Scatter Plot using JSON Structure

In this example, a scatter plot is created using a dictionary that resembles the JSON structure
used internally by Plotly.

1) import plotly.graph_objects as go

fig = {
"data":[
{"x":[1,2,3,4], "y":[10,15,13,17], "type":"scatter"}
],
"layout":{
"title":"Student Performance Scatter Plot"
}

, }

go.Figure(fig).show()

 The data section contains x and y values for the scatter plot.
 The layout section sets the graph title.
 Plotly converts this dictionary into JSON before displaying the chart.




Bar Chart using JSON Format
fig = {
"data":[
{"x":["Math","Science","English"], "y":[85,90,78], "type":"bar"}
],
"layout":{
"title":"Student Subject Scores"
}
}

go.Figure(fig).show()

, This example displays the scores obtained by students in different subjects using a bar chart.
The graph is defined using a JSON-style dictionary.




Online and Offline Plotting

Plotly provides two different modes for displaying graphs:

1. Online Plotting
2. Offline Plotting

Online Plotting

In online plotting, graphs are stored on the Plotly cloud server. Users can share these
visualizations via links or embed them in websites. Online plotting requires a Plotly account
and an internet connection.

Offline Plotting

Written for

Institution
Course

Document information

Uploaded on
April 19, 2026
Number of pages
22
Written in
2025/2026
Type
Class notes
Professor(s)
Archana
Contains
All classes

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
archanabojjapalli

Get to know the seller

Seller avatar
archanabojjapalli
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 weeks
Number of followers
0
Documents
6
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions