axis

How to add custom Http Header for C# Web Service Client consuming Axis 1.4 Web service

狂风中的少年 提交于 2019-11-26 15:22:34
问题 I'm trying to write a web service client in c# which the webservice is Java Axis 1.4. Axis service requires the Authorization: Basic Base64EncodedToken header value in the HTTP Headers. I can't find a way to set this header in standart ways of consuming web services in visual studio.net, like normal WSDL generated refernce nor with WSE3.0 I can't use WCF as the project is developed using .net 2.0. Is there any way to do this ? 回答1: It seems the original author has found their solution, but

用python画 pareto front

雨燕双飞 提交于 2019-11-26 14:26:48
用python画 pareto front 觉得有用的话,欢迎一起讨论相互学习~ Follow Me import os import matplotlib.pyplot as plt import numpy as np def Read_Files(filename): X_axis = [] # X Y_axis = [] # Y with open(filename, 'r') as f: for line in f.readlines(): x = line.split(" ")[0] y = line.split(" ")[1] X_axis.append(float(x)) Y_axis.append(float(y)) f.close() return X_axis, Y_axis def plot_PF(X_axis, Y_axis): # 可以通过c 参数设置颜色 # T = np.arctan2(Y_axis, X_axis) # plt.scatter(X_axis, Y_axis, s=2, c=T, alpha=0.5) plt.scatter(X_axis, Y_axis, s=20, alpha=0.5) plt.savefig(Figname + '.png', dpi=600) plt.show() Filename = './data

numpy day02

拜拜、爱过 提交于 2019-11-26 12:54:11
导入numpy并查看版本 In [2]: import numpy as np ​ np.__version__ ​ Out[2]: '1.13.1' 什么是numpy? Numpy即Numeric Python,python经过扩展可以支持数组和矩阵类型,并且具有大量的函数可以计算这些数组和矩阵。这些数组一般是多维的,而这个扩展的程序包就是numpy。 【注】是数据分析和机器学习中最基本的工具,后面许多API和工具都是建立在他得基础上,如:pandas、scipy、matplotlib等 一、创建ndarray numpy中最基础数据结构就是ndarray:即数组 1. 使用np.array()由python list创建 In [3]: data = [1,2,3] nd = np.array(data) nd Out[3]: array([1, 2, 3]) In [3]: data Out[3]: [1, 2, 3] In [4]: type(nd),type(data) Out[4]: (numpy.ndarray, list) In [5]: nd.dtype # 数组中的元素的类型 . . . In [8]: nd2 = np.array([1,2,3,4.5,True,"1234"]) nd2 . . . In [7]: nd2.dtype . . . 注意:1

Python, Matplotlib, subplot: How to set the axis range?

只愿长相守 提交于 2019-11-26 11:32:01
How can I set the y axis range of the second subplot to e.g. [0,1000] ? The FFT plot of my data (a column in a text file) results in a (inf.?) spike so that the actual data is not visible. pylab.ylim([0,1000]) has no effect, unfortunately. This is the whole script: # based on http://www.swharden.com/blog/2009-01-21-signal-filtering-with-python/ import numpy, scipy, pylab, random xs = [] rawsignal = [] with open("test.dat", 'r') as f: for line in f: if line[0] != '#' and len(line) > 0: xs.append( int( line.split()[0] ) ) rawsignal.append( int( line.split()[1] ) ) h, w = 3, 1 pylab.figure

ggplot2, axis not showing after using theme(axis.line=element_line())

醉酒当歌 提交于 2019-11-26 11:21:15
问题 I am trying to draw this following graph using ggplot2 package, but somehow the axis won\'t show up. the ticks are there, just not the axis line. I have used the theme(axis.line=element_line()) function, but it wouldn\'t work. Here is my code: library(ggplot2) ggplot(data = soepl_randsub, aes(x = year, y =satisf_org, group = id)) + geom_point() + geom_line() +ylab(\"Current Life Satisfaction\") +theme_bw() + theme(plot.background = element_blank(), panel.grid.major = element_blank(), panel

Matplotlib axis with two scales shared origin

元气小坏坏 提交于 2019-11-26 11:05:53
问题 I need two overlay two datasets with different Y-axis scales in Matplotlib. The data contains both positive and negative values. I want the two axes to share one origin, but Matplotlib does not align the two scales by default. import numpy as np import matplotlib.pyplot as plt fig = plt.figure() ax1 = fig.add_subplot(111) ax2 = ax1.twinx() ax1.bar(range(6), (2, -2, 1, 0, 0, 0)) ax2.plot(range(6), (0, 2, 8, -2, 0, 0)) plt.show() I suppose it is possible to perform some computation with .get

【指数编制系列三】权重设置方法

 ̄綄美尐妖づ 提交于 2019-11-26 09:54:51
    在指数编制方法中,我们会经常提到加权平均法(这个在后面会介绍),这里面有一个重要的概念就是权重。权重的设定在指数编制过程中是非常重要的一步,适当的权重设定是指数客观准确反映目标变化趋势的一个关键要素。所以在设定权重的时候一定要选择合适的方法。     权重是一个相对的概念,是针对某一指标而言。某一指标的权重是指该指标在整体评价中的相对重要程度。权重表示在评价过程中,是被评价对象的不同侧面的重要程度的定量分配,对各评价因子在总体评价中的作用进行区别对待。事实上,没有重点的评价就不算是客观的评价。     在统计理论和实践中,权重是表明各个评价指标(或者评价项目)重要性的权数,表示各个评价指标在总体中所起的不同作用。权重有不同的种类,各种类别的权重有着不同的数学特点和经济含义,一般有以下几种权重。     按照权重的表现形式的不同,可分为绝对数权重和相对数权重。相对数权重也称比重权数,能更加直观地反映权重在评价中的作用。     按照权重的形成方式划分,可分为人工权重和自然权重。自然权重是由于变换统计资料的表现形式和统计指标的合成方式而得到的权重,也称为客观权重。人工权重是根据研究目的和评价指标的内涵状况,主观地分析、判断来确定的反映各个指标重要程度的权数,也称为主观权重。     按照权重形成的数量特点的不同划分,可分为定性赋权和定量赋权。如果在统计综合评价时

rotating axis labels in R

天大地大妈咪最大 提交于 2019-11-26 08:46:22
问题 In R, how do I make a (bar)plot\'s y axis labels parallel to the X axis instead of parallel to the Y axis? 回答1: Not sure if this is what you mean, but try setting las=1 . Here's an example: require(grDevices) tN <- table(Ni <- stats::rpois(100, lambda=5)) r <- barplot(tN, col=rainbow(20), las=1) That represents the style of axis labels. (0=parallel, 1=all horizontal, 2=all perpendicular to axis, 3=all vertical) 回答2: Use par(las=1) . See ?par : las numeric in {0,1,2,3}; the style of axis

How do I rotate tick mark labels on the domain of a number axis in JFreeChart?

末鹿安然 提交于 2019-11-26 08:30:27
问题 Just like is being done in the following example, I want the tick mark labels on the domain of chart to be rotated 45 degrees as the are in this chart: http://left.subtree.org/2007/08/14/rotate-labels-jfreechart/ The difference is, I want to do this on a scatter plot with a numeric axis. I can\'t find an equivalent to setCategoryLabelPositions() in the class NumberAxis. 回答1: The method setVerticalTickLabels() may be an alternative. If not, I don't see any choice but to override

Python3快速入门(十三)——Pandas数据结构

天涯浪子 提交于 2019-11-26 03:28:42
Python3快速入门(十三)——Pandas数据结构 一、Pandas数据结构简介 Pandas有三种主要数据结构,Series、DataFrame、Panel。 Series是带有标签的一维数组,可以保存任何数据类型(整数,字符串,浮点数,Python对象等),轴标签统称为索引(index)。 DataFrame是带有标签的二维数据结构,具有index(行标签)和columns(列标签)。如果传递index或columns,则会用于生成的DataFrame的index或columns。 Panel是一个三维数据结构,由items、major_axis、minor_axis定义。items(条目),即轴0,每个条目对应一个DataFrame;major_axis(主轴),即轴1,是每个DataFrame的index(行);minor_axis(副轴),即轴2,是每个DataFrame的columns(列)。 二、Series 1、Series简介 Series是能够保存任何类型数据(整数,字符串,浮点数,Python对象等)的一维标记数组,轴标签统称为index(索引)。 series是一种一维数据结构,每一个元素都带有一个索引,其中索引可以为数字或字符串。Series结构名称: 2、Series对象构造 Series构造函数如下: pandas.Series( data,