What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-19 09:15:16
scatter plot python
# Import matplotlib import matplotlib.pyplot as plt # Set plot space as inline for inline plots and qt for external plots %matplotlib inline # Set the figure size in inches plt.figure(figsize=(10,6)) plt.scatter(x, y, label = "label_name" ) ... Add solution -
Python 2021-10-18 17:13:10
how to plot labeled data with different colors
import matplotlib import matplotlib.pyplot as plt import numpy as np x = [4,8,12,16,1,4,9,16] y = [1,4,9,16,4,8,12,3] label = [0,1,2,3,0,1,2,3] colors = ['red','green','blue','purple'] fig = plt.figure(figsize=(8,8)) plt.scatter(x, y, c=label, cmap=matp... Add solution -
TypeScript 2021-10-14 05:21:05
visual basic how to plot points on a graph using the chart
Imports System.Windows.Forms.DataVisualization.Charting Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim scatterChart As New Chart 'Create the series scatterChart.Series.Add(N... Add solution -
Python 2021-10-11 15:34:07
Python scatter with histogram
# Create some normally distributed data mean = [0, 0] cov = [[1, 1], [1, 2]] x, y = np.random.multivariate_normal(mean, cov, 3000).T # Set up the axes with gridspec fig = plt.figure(figsize=(6, 6)) grid = plt.GridSpec(4, 4, hspace=0.2, wspace=0.2) main_a... Add solution -
Other 2021-10-10 22:48:06
Graphing From Multiple DataFrames
import pandas as pd import dash import dash_core_components as dcc import dash_html_components as html import plotly.graph_objects as go from dash.dependencies import Input, Output, State df1 = pd.DataFrame({'col1': ['a', 'b', 'c'], 'col2': ['d', 'e', '... Add solution -
R 2021-10-10 07:04:07
r value statistics
In statistics, the correlation coefficient r measures the strength and direction of a linear relationship between two variables on a scatterplot. The value of r is always between +1 and –1. To interpret its value, see which of the following values y... Add solution -
Other 2021-10-09 22:15:13
matplotlib hover event
x = np.random.rand(15) y = np.random.rand(15) names = np.array(list("ABCDEFGHIJKLMNO")) c = np.random.randint(1,5,size=15) norm = plt.Normalize(1,4) cmap = plt.cm.RdYlGn fig,ax = plt.subplots() sc = plt.scatter(x,y,c=c, s=100, cmap=cmap, norm=... Add solution -
Python 2021-10-06 10:59:02
annotate diagonal python
import matplotlib.pyplot as plt import numpy as np def addtext(ax, props): ax.text(0.5, 0.5, 'text 0', props, rotation=0) ax.text(1.5, 0.5, 'text 45', props, rotation=45) ax.text(2.5, 0.5, 'text 135', props, rotation=135) ax.text(3.5, 0.... Add solution -
Python 2021-10-03 02:51:02
plot data python
names = ['group_a', 'group_b', 'group_c'] values = [1, 10, 100] plt.figure(figsize=(9, 3)) plt.subplot(131) plt.bar(names, values) plt.subplot(132) plt.scatter(names, values) plt.subplot(133) plt.plot(names, values) plt.suptitle('Categorical Plotting') ... Add solution
Best helpers
Ranking is empty