Hole puncher Show Picture

import sys
reload(sys)
sys.setdefaultencoding(‘utf8‘)

import matplotlib.pyplot as plt
import string

file = open("GD.txt")

i = 0
x = range(0)
y = range(0)

for line in file:
    x.append(string.atoi(line[0:7], 10))
    y.append(string.atoi(line[8:], 10))

print x[1]
print "111111111111"
#print y

# plt.xlabel("x position")
# plt.ylabel("y position")
# plt.title("E track distribution diagram \n Red point is start and Blue point is end.")
#plt.plot(x,y)

plt.plot(x, y, ‘k--‘, linewidth=1, linestyle="-.")
for i in range(94):
      plt.plot(x[i], y[i], ‘yo-‘, linewidth=1) 

plt.plot(x[0], y[0], ‘r*‘,  linewidth=10)
plt.plot(x[94], y[94], ‘b*‘,  linewidth=10)

plot(x, y)   # plot x and y using blue circle markers
plt.show()

  

import string
import matplotlib.pyplot as plt
import numpy as np

file = open("picture.txt")

i = 0
x = range(0)
y = range(0)

for line in file:
    x.append(string.atoi(line[0:7], 10))
    y.append(string.atoi(line[8:], 10))

years = x
price = y

plt.plot(years, price, ‘b*‘)    #,label=$cos(x^2)$)
plt.plot(years, price, ‘r‘)
plt.xlabel(years(+2000))
plt.ylabel("housing average price(*2000 yuan)")
plt.ylim(0, 15)
plt.title(‘line_regression & gradient decrease‘)
plt.legend()
plt.show()

  Hole puncher

时间: 2024-10-25 18:23:24

Hole puncher Show Picture的相关文章

L330 Black hole picture captured for first time in space ‘breakthrough’

Black hole picture captured for first time in space ‘breakthrough’ Astronomers have captured the first image of a black hole, heralding a revolution in our understanding of the universe’s most enigmatic objects. The picture shows a halo of dust and g

HDU 1828 Picture(矩形周长并)

HDU 1828 Picture 题目链接 题意:给定n个矩形,输出矩形周长并 思路:利用线段树去维护,分别从4个方向扫一次,每次多一段的时候,就查询该段未被覆盖的区间长度,然后周长就加上这个长度,4个方向都加完就是答案 代码: #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int N = 5005; int n; struct Rec { int

POJ1584 A Round Peg in a Ground Hole 凸包判断 圆和凸包的关系

POJ1584 题意:给定n条边首尾相连对应的n个点 判断构成的图形是不是凸多边形 然后给一个圆 判断圆是否完全在凸包内(相切也算) 思路:首先运用叉积判断凸多边形 相邻三条变叉积符号相异则必有凹陷 O(n) 之后首先判断圆心是否在凸多边形内 如果凸多边形的点有序 则可以在logn时间内判断 否则先排序再判断 O(nlogn) 然后用每条边(线段)判断到圆心的距离即可 这道题也没给数据范围 O(nlogn)是可以AC的. #include<iostream> #include<stdio

usaco Picture

/* ID: modengd1 PROG: picture LANG: C++ */ #include <iostream> #include <stdio.h> #include <memory.h> #include <vector> #include <algorithm> using namespace std; int N; struct edge { int y,x1,x2; bool isbegin; bool friend ope

杭电1162--Eddy&#39;s picture(Prim()算法)

Eddy's picture Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8070    Accepted Submission(s): 4084 Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to b

hdu1828 Picture(线段树+离散化+扫描线)两种方法

C - Picture Time Limit:2000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64u Submit Status Description A number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or

线性DP POJ2279 Mr.Young&#39;s Picture Permutations

Mr. Young's Picture Permutations Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 1128   Accepted: 562 Description Mr. Young wishes to take a picture of his class. The students will stand in rows with each row no longer than the row behin

HDU1162-Eddy&#39;s picture(最小生成树)

Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his small room, and he usually puts out his newest pictures to let his friends appreciate. but the result i

Eddy&#39;s picture(最小生成树)

Eddy's picture Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 228 Accepted Submission(s): 168   Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to become