Tag:Draw a picture

  • Sampwidth problem of drawing wave waveforms with Python’s pylab


    problem I found many places on the Internet, and the core code is the same, such as this sentence. wavedata=np.fromstring(bindata,dtype=np.short) The effect is also OK. But a random audio file in office was loaded at one time, and the waveform was completely wrong. It was close to the square wave, and it was all numbers […]

  • HTML5 canvas jcanvas plug-in for drawing and saving pictures


    The jcanvas plug-in is used. Copy code The codes are as follows: <head> <script src=’jquery-1.9.1.js’></script> <script src=’jcanvas.min.js’></script> <!–<script src=’js/jquery.mobile-1.2.0.min.js’></script> –> <script> var maxX=-1; var maxY=-1; var minX=99999; var minY=99999; function checkData(event){ var x=event.pageX-$(‘canvas’).offset().left; var y=event.pageY-$(‘canvas’).offset().top; if(x>maxX){ maxX=x; }else if(x<minX){ minX=x; } if(y>maxY){ maxY=y; }else if(y<minY){ minY=y; } } $(function(){ var obj=$(‘canvas’); var temp_e; var temp_draw=false; […]

  • Python+ artificial intelligence employment class v5.0


    Download:python+ artificial intelligence employment class v5.0 Say goodbye to monotony, learn a small example in 60 seconds, learn Python systematically, from beginner to master. There are 190 examples of Python: Chapter 0: feeling the beauty of Python Chapter 1: Python Basics Chapter 2: pit of Python Chapter 3: Python strings and regular Chapter 4: Python […]

  • Python turtle drawing figures with infinite decimal places


    For some infinite fractions, use Python turtle to draw the graph of infinite decimal places. It’s very nice Calculate 1/13 and draw 1/13, fd=20, s=400 Design idea 1. introduce large decimal in Python to solve the problem of decimal places 2. calculate the required fraction, convert it into a string and extract the decimal places […]

  • “Beautiful” practical C language calculator (1) – shape and structure


    I wrote an article before to introduce EasyX graphical interface library. Here I will introduce a powerful calculator written by a great God. I only condense the basic calculation functions for you to see. Interested partners can analyze all the source codeThe original address is here: https://codebus.cn/contributor/a/erlingeryi-calcLet’s first look at the effect of streamlining: Next, […]

  • R for Data Science (note) — data collation (pivot correlation function)


    R for Data Science After thinking about it, I still want to make a note directory, which can facilitate query R for Data Science (note) — data transformation (used by filter) R for Data Science (note) — data transformation (select basic use) R for Data Science (note) — data transformation (select combination of other functions) […]

  • R package: dplyr package data shaping tool


    introduce For more knowledge sharing, please visithttps://zouhua.top/。 Dplyr is a package of data manipulation, which contains multiple functions to process data. The main functions are: mutate()Add a new variable select()Select a column name filter()Filter rows summarise()Summation statistics arrange()Sort group_by()Group processing install #install.packages(“dplyr”) #install.packages(“nycflights13”) #devtools::install_github(“tidyverse/dplyr”) library(dplyr) library(nycflights13) Tibbles data type tibblesCan replacedata.frame, although the former can […]

  • [HTML5] canvas drawing simple pictures tutorial


    Get the image object and new it Define SRC attribute of image object, parameter: image path Define onload method of image object, call DrawImage () method of context object, parameters: image object, X coordinate, y coordinate   Overload method, call the DrawImage () method of context object, parameters: image object, X coordinate, y coordinate, image […]