dygraphs configuring dual x axes - plot

I have a dygraph that is plotting two sets of data. The one x-axis is 1 to 600 and the second y-axis is 1-300. How can both be plotted showing the x-axis and the 300 point plot scaled correctly. See the attached example of what I am getting. Would love to have numbers on the second y axis too.
thanksCurrent Code Example

Related

Is there an R function for displaying multiple x axis labels and y axis labels?

Image: plotted the relationship between 4 variables, resulting in 12 scatterplots
In the image above, I've got 12 scatterplots, but no axis labels making it a bit difficult to know what each scatterplot is showing.
I believe I can just use the xlab and ylab function to tell R what the axis labels should be if I only have 1 scatterplot. But if I have 12 scatterplots, is it possible to tell R to somehow use the appropriate heading from my csv file as the x-axis label and y-axis label for each plot?
Here is a screenshot of my data if it helps:
cheese csv screenshot

Strange x-axis in histogram for discrete variable in R

I have some discrete data that I'm trying to plot in a histogram in R. I'm using the built in hist() function, which works fine most of the times for the data I have. However, when it comes to a discrete variable it looks somewhat strange (unfortunately I cannot add the picture). I interpret it as "since the bin for 0 and 1 children must fit between 0 and 1 it determines the width of all bins and thus the "from 1.5 to 2" result". How can I put the numbers on the x-axis centered underneath each bin instead?
Thanks in advance!
You might want to consider drawing the axis in a second step:
Prevent x-axis with xaxt="n":
hist(cars$speed, xaxt="n")
Draw x-axis and adjust label position with hadj=:
axis(1, at=seq(0,25,5), hadj=2.5, labels = c("",seq(5,25,5)))

plot two lines on the same axes without leading to overlapping values on the y axis

Is there a way to change the y axis in R so that there isn't overlapping numbers when you plot two trend lines ?
I have managed to plot the two lines I am considering in one graph but there is a nasty Y axis - does anyone know how to avoid this happening?

How to add a ruler for both x and y-axis?

How can I add a ruler to a ggplot plot? I need to see how many mm or cm there is in the plot for the different bars in different scenarios. I want to know how big my output needs to be depending on the number of bars and a great help would be to display mm or cm information for the x and y axis.

R: why is boxplot(x,log="y") different from boxplot(log(x))?

delme <- exp(rnorm(1000,1.5,0.3))
boxplot(delme,log="y")
boxplot(log10(delme))
Why are the whiskers different in this 2 plots?
Thanks
Agus
I would say that in your first plot you just changed the y axis to log, so the values you plot still range between 1 and 10. In this plot the y axis is a log scale. The whiskers on this axis look different because the space between each "tick" (ie axis break) is not constant (there is more space between 2 and 4 than between 10 and 8)
In the second plot, you take the log of the values then plot them, so they range from .2 to 1, and are plotted with a linear y axis.
Look at the summary for both of the normal and log transformed dataframes

Resources