This examples show how to convert svg files to png files with white background or transparent background. You can convert single file, you can also convert many files together quickly. Create a file which includes all svg file names, and create a file which includes all output png file names. It’s better put the svg ..
Category : Data Visualization
My example of Python code for mapping variables overlay with geographic information. Elements in the map include ocean, coastline,borders,lakes,rivers,province borders, contour, contourf, pcolormesh, scatter, labels, province (or state) names. Also includes information about how to set cmap, what range of the data (minimum, maximum) to show, how many levels to display the data. How to ..
This example is used for fitting world covid-19 cases number import numpy as np import pandas as pd from datetime import datetime from lmfit import Minimizer, Parameters, report_fit import chart_studio.plotly as py import cufflinks as cf def Cauchy_cumulative_hazard_fit(x,loc,scale,decaybase): decayterm=np.power(decaybase,(x-loc)) decayterm[np.whe..
import pandas as pd from plotly.offline import iplot import cufflinks cufflinks.go_offline() # Set global theme cufflinks.set_config_file(world_readable=True, theme=’pearl’) fig=df.iplot(asFigure=True, mode=’lines+markers’, size=6, secondary_y = ‘Increase’, secondary_y_title=’Increase’, xTitle=’Date’, yTitle=’Cases’, title=’Projected COVID-19 Cases in South Korea’, theme=’solar’) fig.show() import pandas as pd import chart_studio.plotly as py from ipywidgets import interact, interact_manual import cufflinks as cf @interact def plot_ProjectedSouthKereaCOVID19(): fig=output.iplot(asFigure=True, ..
import pandas as pd import numpy as np # model from lmfit import Minimizer, Parameters, report_fit #plot import chart_studio.plotly as py import ipywidgets as widgets from ipywidgets import interact, interact_manual import cufflinks as cf theCountry=’Canada’ threshhold=10 theData=confirmed_series_21[confirmed_series_21[theCountry]>threshhold] data=theData[theCountry] start_date= data.index[0] end_date= data.index[-1] dateData=pd.date_range(start=start_date,end=end_date) forecastDays=60 dateForecast= pd.date_range(start=end_date,periods=forecastDays+1)[1:] dateObsForecast=dateData.append(dateForecast) #dateObsForecast # define objective function: returns the array ..
import pandas as pd import folium stations_fn=”LatitudeLongitude.csv” df=pd.read_csv(stations_fn) world_map = folium.Map(location=[10,0], tiles=”cartodbpositron”, zoom_start=2,max_zoom=25,min_zoom=2) for i in range(0,len(df)-100000): folium.Circle( location=[df.iloc[i][‘Latitude’],df.iloc[i][‘Longitude’]], radius=0.5, color=’#0066ff’, fill_color=’#3385ff’, fill=True).add_to(world_map)..
import cv2 input_imgfn=”tobrighten.jpg” output_imgfn=”brightened.jpg” def change_brightness(img, value=30): hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) h, s, v = cv2.split(hsv) v = cv2.add(v,value) v[v > 255] = 255 v[v < 0] = 0 final_hsv = cv2.merge((h, s, v)) img = cv2.cvtColor(final_hsv, cv2.COLOR_HSV2BGR) return img img = cv2.imread(input_imgfn) #load rgb image img = change_brightness(img, value=90) #increases #img = change_brightness(img, value=-30) ..
Antiderivative Drag the red points to check the how does the val..
Input any of the following functions or their combination $sinh(x)$, $cosh(x)$,$abs(x),sin(x),cos(x),tan(x),acos(x),asin(x),atan(x),exp(x),sqrt(x..
Regression Model Through the points defining the dashed line the regression polynomial of degree ‘degree’ is computed and displayed. The points can be scaled by adjusting the slider ‘scale’. The degree of the regression polynomial can be changed by using the slider ‘degree’. Here are 30 randomly distributed points. The range of these points can ..