Python Bokeh – Plotting a Scatter Plot on a Graph Read Courses Practice Improve Improve Improve Like Article Like Save Article Save Report issue Report Bokeh is a Python interactive data visualization. It renders its plots using HTML and JavaScript. It targets modern web browsers for presentation providing elegant, concise construction of novel graphics with high-performance interactivity. Bokeh can be used to plot a scatter plot on a graph. Plotting squares on a graph can be done using the scatter() method of the plotting module. plotting.figure.scatter() Syntax : scatter(parameters) Parameters : x : x-coordinates of the center of the glyphs y : y-coordinates of the center of the glyphs marker : signifies the type of the glyph Returns : an object of class GlyphRenderer Example 1 : In this example we will be using the default values for plotting the graph. # importing the modules from bokeh.plotting import figure, output_file, show # file to save the model output_file("gfg.html") # instantiating the figure object graph = figure(title = "Bokeh Scatter Graph") # the points to be plotted x = [1, 2, 3, 4, 5] y = [1, 2, 3, 4, 5] # plotting the graph graph.scatter(x, y) # displaying the model show(graph) Output : Example 2 : In this example we will be plotting multiple scatter points with various other parameters # importing the modules from bokeh.plotting import figure, output_file, show from bokeh.palettes import magma import random # file to save the model output_file("gfg.html") # instantiating the figure object graph = figure(title = "Bokeh Scatter Graph") # name of the x-axis graph.xaxis.axis_label = "x-axis" # name of the y-axis graph.yaxis.axis_label = "y-axis" # points to be plotted x = [n for n in range(256)] y = [random.random() + 1 for n in range(256)] size = 10 # color value of the scatter points color = magma(256) # plotting the graph graph.scatter(x, y, size = size, color = color) # displaying the model show(graph) Output : Don't miss your chance to ride the wave of the data revolution! Every industry is scaling new heights by tapping into the power of data. Sharpen your skills, become a part of the hottest trend in the 21st century.Dive into the future of technology - explore the Complete Machine Learning and Data Science Program by GeeksforGeeks and stay ahead of the curve. Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore. Last Updated : 10 Jul, 2020 Like Article Save Article Previous Python Bokeh - Plotting Vertical Bar Graphs Next Python Bokeh - Plotting Patches on a Graph Share your thoughts in the comments Add Your Comment Please Login to comment... Similar Reads Pandas Scatter Plot â DataFrame.plot.scatter() Python Bokeh - Plotting a Line Graph Python Bokeh - Plotting Ellipses on a Graph Python Bokeh - Plotting Dots on a Graph Python Bokeh - Plotting Diamond Dots on a Graph Python Bokeh - Plotting Diamond Crosses on a Graph Python Bokeh - Plotting Diamonds on a Graph Python Bokeh - Plotting Dashes on a Graph Python Bokeh - Plotting Hexagons on a Graph Python Bokeh - Plotting Hexagon Dots on a Graph Complete Tutorials Python API Tutorial: Getting Started with APIs Advanced Python Tutorials Python Automation Tutorial OpenAI Python API - Complete Guide Pandas AI: The Generative AI Python Library Like Y Yash_R Follow Article Tags : Data Visualization Python Bokeh-plotting-figure-class Python-Bokeh Python Practice Tags : python Additional Information Vote for difficulty : Easy Normal Medium Hard Expert