axis-labels

Years-only display on xAxis with Highcharts

北慕城南 提交于 2020-01-25 21:15:13
问题 I have a graph which displays a line over many days, months and years. I'd like to have on the xAxis only every xth year displayed. In Safari, it displays it correctly; in Firefox (41.0), it displays 1970 all the way through. Here is a fiddle. The data look like this: Date,Value 1-Jan-1993, 2-Jan-1993, 3-Jan-1993, 4-Jan-1993, 5-Jan-1993,-4.30161566849 The xAxis definition like this: xAxis: { tickWidth: 0, type: 'datetime', labels: { format: '{value:%Y}' } } Here is a screenshot of what

How to auto adjust R figure axis labels to matrix size?

夙愿已清 提交于 2020-01-23 12:23:30
问题 I want to make the fontsize of the y-axis labels adjustable to the input data size on the y-axis like in Fig. 3, in contrast to the current situation in Fig. 1-2 where labels are not next to the corresponding lines. Code library("corrgram") # https://stackoverflow.com/a/40387233/54964 ids <- seq(1,18) x_at <- seq(0.075, 0.925, length.out = length(ids)) y_at <- seq(0.075, 0.91, length.out = length(ids)) createLabels <- function(xlab, ylab, x_labels, y_labels){ ids <- y_labels # assume here x

How to auto adjust R figure axis labels to matrix size?

守給你的承諾、 提交于 2020-01-23 12:22:34
问题 I want to make the fontsize of the y-axis labels adjustable to the input data size on the y-axis like in Fig. 3, in contrast to the current situation in Fig. 1-2 where labels are not next to the corresponding lines. Code library("corrgram") # https://stackoverflow.com/a/40387233/54964 ids <- seq(1,18) x_at <- seq(0.075, 0.925, length.out = length(ids)) y_at <- seq(0.075, 0.91, length.out = length(ids)) createLabels <- function(xlab, ylab, x_labels, y_labels){ ids <- y_labels # assume here x

how to subscript the x axis tick label

痞子三分冷 提交于 2020-01-23 04:54:12
问题 I generated this graph with the below script. But how could I subscript the "10" in PM10, "2" in SO2, and"2" in NO2? I tried levels(df$variable) <- c("PM[10]","SO[2]", "NO", "NO[2]") , but does not work. Can anyone help? Thank you! variable <- c("PM10","SO2","NO","NO2") coef <- c(10,20,30,40) coef_lb <- c(-5,10,23,27) coef_ub <- c(20,39,39,50) df <- as.data.frame(cbind(variable, as.numeric(coef),as.numeric(coef_lb),as.numeric(coef_ub))) df$variable <- factor(df$variable,levels=c("PM10","SO2",

How to set the origin to O and remove the zero labels in Maxima draw?

元气小坏坏 提交于 2020-01-15 12:46:06
问题 The draw (2d) function in Maxima has several settings to control the axis, but as far as I can tell, none that hides the zero label of the xy-axis and to replace it with either a 0 or a O. Maybe that's possible to use with the option user_preamble? 回答1: You will need to set the xtics and ytics values explicitly, omitting the origin, and use label to label the origin. load(draw)$ draw2d( user_preamble="set zeroaxis linetype 5; set xtics axis; set ytics axis; set border 0;", xtics={-3, -2, -1,

graph axis calibration in c++

依然范特西╮ 提交于 2020-01-14 01:41:18
问题 I am plotting some float data in a 2D graph and I need to calibrate the axis of graph into small units that looks neat. Obviously this unit varies based on magnitude of the data. I am trying to find out a good way to divide the axis into nice looking number. for example if my data runs from -1.3345 to +5.882 may be divide in units of 1.0 or 0.5. if my data us from -100 to 800 divide the axes into units of 100 or 50. (I hope that makes sense) right now I am dividing the range (largest value -

Display two parallel axes on a ggplot (R)

扶醉桌前 提交于 2020-01-13 06:05:21
问题 Let's say we have a simple plot of the following kind. library(ggplot2) df = data.frame(y=c(0,1.1,2.3,3.1,2.9,5.8,6,7.4,8.2,9.1),x=seq(1,100, length.out=10)) ggplot(df,aes(x=x,y=y)) + geom_point() x perfectly correlates with z . The relation is: Constant=x^2*z=1.23 therefore I could rewrite the data.frame like this: df = cbind(df,1.23/df$x^2) The question is: How can I display both variables x and z one the x-axis? It could be one at the bottom and one at the top of the graph or both at the

Display two parallel axes on a ggplot (R)

限于喜欢 提交于 2020-01-13 06:04:30
问题 Let's say we have a simple plot of the following kind. library(ggplot2) df = data.frame(y=c(0,1.1,2.3,3.1,2.9,5.8,6,7.4,8.2,9.1),x=seq(1,100, length.out=10)) ggplot(df,aes(x=x,y=y)) + geom_point() x perfectly correlates with z . The relation is: Constant=x^2*z=1.23 therefore I could rewrite the data.frame like this: df = cbind(df,1.23/df$x^2) The question is: How can I display both variables x and z one the x-axis? It could be one at the bottom and one at the top of the graph or both at the

Increasing Frequency of x-axis labels for dates on DataFrame plot

回眸只為那壹抹淺笑 提交于 2020-01-12 06:01:06
问题 I have a pandas DataFrame with two columns: month_of_sale which is a date, and number_of_gizmos_sold which is a number. I'm trying to increase the frequency of the labels on the x-axis so it's easier to read, but I can't! Here is the df.head() of my table: and this is what it plots: df.plot(y='number_of_gizmos_sold', figsize=(15,5)) I'd like to increase the frequency of the labels, because there's a big space in between them. What I've tried plot.xaxis.set_major_locator(MonthLocator()) but

Increasing Frequency of x-axis labels for dates on DataFrame plot

北战南征 提交于 2020-01-12 06:00:10
问题 I have a pandas DataFrame with two columns: month_of_sale which is a date, and number_of_gizmos_sold which is a number. I'm trying to increase the frequency of the labels on the x-axis so it's easier to read, but I can't! Here is the df.head() of my table: and this is what it plots: df.plot(y='number_of_gizmos_sold', figsize=(15,5)) I'd like to increase the frequency of the labels, because there's a big space in between them. What I've tried plot.xaxis.set_major_locator(MonthLocator()) but