axis

Splitting axis labels with expressions

爷,独闯天下 提交于 2019-12-22 12:18:25
问题 I have a plot with a long label containing an expression and I want to split it on two lines. Adding a "\n" inside the expression the result is not as expected. ylabel <- expression("A very long label with text and \n expression"*(alpha+beta) [ij]*" A very long label with text and expression") curve(x^3 - 3*x, -2, 2, xlab=xlabel) Any help would be appreciated. Thanks 回答1: Here is another solution, relying on atop as did @AndresT in his edit. Note that we cannot use control character like \n

Datetime axis spacing

一个人想着一个人 提交于 2019-12-22 11:59:40
问题 I have an errorbar plot where the xaxis is a list of datetime objects. The standard plotting method will put the first and last point so that they are right on the bounding box of the plot. I would like to offset by a half tick so that the first and last point can be seen clearly. ax.axis(xmin=-0.5,xmax=len(dates)-0.5) does not work for obvious reasons. It would be nice to be able to do this without hardcoding any dates. The following will produce a plot which has ten points but you can

removing x axis in error.bars

早过忘川 提交于 2019-12-22 10:57:38
问题 I've been having a problem today, I want to remove the x-axis from the following R-plot, but it just won't disappear. I want the axis to be on top. Is anybody able to help me? library(psych) temp <- describe(attitude) error.bars(stats=temp,xaxt="n") axis(3) 回答1: You can use fixInNamespace() to edit the error.bars() function in the psych NAMESPACE. Try: fixInNamespace(error.bars) That will open the function in a rudimentary text editing window. Find the axis() calls and comment out the ones

Axis HTTP Vs Axis HTTPS Proxy Settings

倖福魔咒の 提交于 2019-12-22 10:34:13
问题 My Java application deployed on Weblogic Cluster invokes two Webservices which are as follow. • It sents SOAP Client request to External Application which is on internet) over HTTPS.(Java Classes created through Axis 1.4) • Thereafter It sents SOAP Client request to internal Application(present on the other node which is connected to my LAN) over HTTP.(Java Classes created through JAX-WS:Jdeveloper Wizard) In order to reach the 1st WS, I have to set the https proxy settings for the web

Add Different Labels to Secondary X-Axis of Levelplot in Lattice in R

淺唱寂寞╮ 提交于 2019-12-22 09:47:41
问题 I've managed to label the secondary X-axis in a levelplot using scale=list((alternating=3)) as solved by @KoenV here: How to Add Labels to Top X-Axis of Levelplot in Lattice Package Now this duplicates the primary X-axis labels onto the secondary X-axis as can be seen by running the code below. However, I need to add different labels to the secondary X-axis. Does anyone know how to do this? In the example below I would like to have 'hor' as the primary X-axis labels and 'hor2' as the

R X-axis Date Labels using plot()

僤鯓⒐⒋嵵緔 提交于 2019-12-22 08:59:47
问题 Using the plot() function in R, I'm trying to produce a scatterplot of points of the form (SaleDate,SalePrice) = (saldt,sapPr) from a time-series, cross-section real estate sales dataset in dataframe format. My problem concerns labels for the X-axis. Just about any series of annual labels would be adequate, e.g. 1999,2000,...,2013 or 1999-01-01,...,2013-01-01. What I'm getting now, a single label, 2000, at what appears to be the proper location won't work. The following is my call to plot() :

numpy中transpose用法

萝らか妹 提交于 2019-12-22 08:04:06
np . transpose ( a , axes = None ) a为输入的数组,axis为int类型的列表,这个参数可选,默认是反转输入数组的维度,指定该值时需要按照参数所指定的值进行数组变换 1.它对于一维数组不起作用 2.对于二维数组的操作:就是对原数组的转置操作 3.对于三维数组: (1)从以上实验可以看出:a.transpose()生成了一个新的数组,新数组和原数组并不共享内存,用 c = np.transpose(a) 也是一样 (2)原数组的axis=(0,1,2), np.transpose() 中,axis的默认参数为(2,1,0)。分析一下axis从(0,1,2)到(2,1,0)的转换过程 #a数组的下标为: A = [ [ [ ( 0 , 0 , 0 ) , ( 0 , 0 , 1 ) , ( 0 , 0 , 2 ) , ( 0 , 0 , 3 ) ] , [ ( 0 , 1 , 0 ) , ( 0 , 1 , 1 ) , ( 0 , 1 , 2 ) , ( 0 , 1 , 3 ) ] , [ ( 0 , 2 , 0 ) , ( 0 , 2 , 1 ) , ( 0 , 2 , 2 ) , ( 0 , 2 , 3 ) ] ] , [ [ ( 1 , 0 , 0 ) , ( 1 , 0 , 1 ) , ( 1 , 0 , 2 ) , ( 1 , 0 , 3 )

How to define y axis breaks in a facetted plot using ggplot2?

余生颓废 提交于 2019-12-22 06:47:53
问题 I have to plot data with very different range values. I am using the facet design of ggplot2 with the option facet_grid(variable ~ ., scales = "free") . However, I would like to set the values of the breaks on the y axis such that for all variables the breaks are c(0, max(variable)/2, max(variable)) . I tried using scale_y_continuous , but it did not work. Reproducible example: v1 <- sample(rnorm(100, 10, 1), 30) v2 <- sample(rnorm(100, 20, 2), 30) v3 <- sample(rnorm(100, 50, 5), 30) fac1 <-

Ant javac task errs out: [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6

元气小坏坏 提交于 2019-12-22 05:53:37
问题 I'm trying to run an ant task that uses axis2-ant-plugin-1.6.0.jar\org\apache\axis2\tool\ant\AntCodegenTask to perform a WSDL2Java operation. At the top of the ant script, I define java6.boot.classpath : <property name="java6.boot.classpath" value="${env.JAVA6_BOOT_CLASSES}"/> And I have the JAVA6_BOOT_CLASSES environment variable set to C:\dev\java\64-bit\jdk-1.6.0_45\bin . The pertinent ant target is as follows: <!-- dist.jar target --> <target name="dist.jar" depends="generate" description

Convert a Unit Vector to a Quaternion

懵懂的女人 提交于 2019-12-22 05:52:21
问题 So I'm very new to quaternions, but I understand the basics of how to manipulate stuff with them. What I'm currently trying to do is compare a known quaternion to two absolute points in space. I'm hoping what I can do is simply convert the points into a second quaternion, giving me an easy way to compare the two. What I've done so far is to turn the two points into a unit vector. From there I was hoping I could directly plug in the i j k into the imaginary portion of the quaternion with a