import seaborn as sns
sns.set(style="whitegrid")
tips = sns.load_dataset("tips")
ax = sns.violinplot(x=tips["total_bill"])
In [3]:
ax = sns.violinplot(x="day", y="total_bill", data=tips)
In [ ]:
embedded system,Arduino,Raspberry pi,ARM7,MM32,STM32,PIC and Python,Django,Datascience and web development
Friday, April 24, 2020
violin plot using seaborn in datascience in python
Thursday, April 23, 2020
reverse the given array in c language
#include <stdio.h>
#include <stdlib.h>
int main()
{
int num, *arr, i;
scanf("%d", &num);
arr = (int*) malloc(num * sizeof(int));
for(i = 0; i < num; i++) {
scanf("%d", arr + i);
}
/* Write the logic to reverse the array. */
for(i = num-1; i>-1; i--)
printf("%d ", *(arr + i));
return 0;
}
output:
6
16 13 7 2 1 12
12 1 2 7 13 16
how to print the range between two numbers in text format
int main()
{
int a, b;
char *str[] = {"one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "even", "odd"};
scanf("%d\n%d", &a, &b);
// Complete the code.
for (int i=a; i<=b; i++) {
if (i <= 9)
printf ("%s\n", str[i-1]);
else
printf ("%s\n", str[9+(i%2)]);
}
return 0;
}
output:
input:
8
11
output:
eight
nine
even
odd
Monday, April 20, 2020
3d plotting for matplot li
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax1 = plt.axes(projection='3d')
a = [4,2,5,7,8,2,9,3,7,8]
b = [5,6,7,8,2,5,6,3,7,2]
c = np.zeros(10)
x = np.ones(10)
y = np.ones(10)
z = [5,3,7,4,8,2,4,8,9,1]
ax1.bar3d(a, b, c, x, y, z, color = 'cyan')
ax1.set_xlabel('x axis')
ax1.set_ylabel('y axis')
ax1.set_zlabel('z axis')
plt.show()
In [ ]:
In [ ]:
Subscribe to:
Posts (Atom)
-
using python we can create our on DB using python in mysql. please follow the below lines of code import pymysql #create the database conne...
-
0885-8993 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/pub...