Multiple axis excel 2010 chart - excel-charts

I´d like to create excel chart with multiple axis x using dynamic - offset defined range.
I have columns A, B, C - for multiple axis. If I define this as a range e.g A2:C50 then the items (values) in the rows are ordered to multiple axis (horizontal categories - in chart data definition). In column D i have trend values - Y axis.
But I would need to define this range dynamicaly using offset. I created named range MultipleAxis defined as =OFFSET($A$2:$C$50;0;0;COUNT($D$2:$D$50);1). I used this range in definition of horizontal categories but I see on the X axis only values from column A and no multiple axis option is set.
Is it possible to define multiple axis in Excel 2010 chart using dynamic defined range by offset?
Thank You very much for help

I solved the problem. The mistake what I made was in the definition of offset function. The correct using offset function must be this: =OFFSET($A$2;0;0;COUNT($D$2:$D$50);3).

Related

How to create a 100% stacked bar chart in R by counting data?

I am trying to create a bar chart using ggplot that adds up difference scores and groups them with positive or negative values and then creates a graph of the percentage. I can't seem to figure out the right code to do this however and could use some guidance.
I have two columns I am focusing on: one for the grade level and then another column with the difference score. I tried summing up the values of positive and negative for an aggregate total, but kept running into errors manipulating that data.
I ended up making a new column and merged it to the data frame if the values in a row were less than or greater than 0. I was able to graph this, but I struggle to create a 100% stacked bar chart.
Ideally what I hope to do is to create a stacked bar chart with grades 6th - 10th in the X-axis and the y-axis being the percentage of students in that grade with a positive difference score against the % with a negative score.
# Attempting to create a new column of boolean values to create the chart
Pos_Neg_df <- c(Fall_Math_Data$RITDifference >0)
Percentage_Math_Data <- cbind(Fall_Math_Data, Pos_Neg_df)
# Plotted this
ggplot(Percentage_Math_Data) +geom_bar(aes(x = Grade, fill = Pos_Neg_df)
Can you provide some sample data? It's difficult to see what exactly you're trying to do. That said, in your geom_bar, adding position = "stack" may be what you're looking for (see ggplot2 documentation.)

Excel scatter plot x axis displays only sequential numbers but not real data selected for x axis

I have an excel scatter plot with 5 different data series on single chart. First 4 series are working well. When I want to add a new series with similar x-axis data (0.0, 0.4, 0.9 .. ) the plot is displayed with x-axis values as 1,2,3 but not as the data specified.
Changing the chart types did not help. Not sure how can I get the x-axis as data but not as sequential numbers. Any help is appreciated. Thanks.
Added the screenshot of chart and its xaxis data. The values are in number format only just as data for other series. Everytime I am adding a new series on to this, its starting with one number later.... (1,2,3...) next series x axis at (2,3,4....) but not with real x values as selected.
Solved it my slef... The problem is X-axis range is for 18 cells and all the cells had formula with IF condition... When I removed the IF condition, x-axis worked well as numbers
The IF condition I used was "=IF(A10<>"",B10=A10-A4,""), for some reason excel chart considered this as some text and populated the x axis as 1,2,3 but not as the values specified.

Box plot categories from two variables

Sorry for basic question, I am new to R.
I would like to plot a box with subcategories and then with measurements taken over time.
For example I have tried this:
boxplot(field_data$week_1~field_data$field, ylab= 'number of infected plants')
This gives me two box plots (field is either ‘north’ or ‘south’). I want to split each boxplot into two boxplots by "position" variable (1 or 2). Is there a way to make it so that I will still have a plot with 2 main categories defined by "field", but then each will consist of two boxplots defined by "position" variable. I would also then like to plot the results from the ‘week_2’ readings next to the 'week_1' set of box plots. All of the data is in one df. I have other variables ('beds' and 'rows') with different levels too that categorise the measurements taken.
I have tried with ggplot but not sure how to do this or if this is the right function.
Thank you.

How to send parameter to Geom.histogram when using Geom.subplot_grid in Gadfly?

I am trying to plot several histograms for the same data set, but with different numbers of bins. I am using Gadfly.
Suppose x is just an array of real values, plotting each histogram works:
plot(x=x, Geom.histogram(bincount=10))
plot(x=x, Geom.histogram(bincount=20))
But I'm trying to put all the histograms together. I've added the number of bins as another dimension to my data set:
x2 = vcat(hcat(10*ones(length(x)), x), hcat(20*ones(length(x)), x)
df = DataFrame(Bins=x2[:,1], X=x2[:,2])
Is there any way to send the number of bins (the value from the first column) to Geom.histogram when using Geom.subplot_grid? Something like this:
plot(df, x="X", ygroup="Bins", Geom.subplot_grid(Geom.histogram(?)))
I think you would be better off not using subplot grid at that point, and instead just combine them with vstack or hstack. From the docs
Plots can also be stacked horizontally with ``hstack`` or vertically with
``vstack``. This allows more customization in regards to tick marks, axis
labeling, and other plot details than is available with ``subplot_grid``.

Creating a continuous density heatmap of 2D scatter data in R with each column of dataframe coloured differently

I am curious if there's a way to improve upon the answers mentioned in 1
For example,
1) Can the x and y columns of the data-frame be colored differently rather than red or using a color gradient?. And as specified in ggplot2 documentation, I don't want color the columns according to a factor
2) Furthermore, can the shape of points be altered respectively for each of the columns in the data-fame (e.g. triangles for x values and round for y values)
To achieve the same, afaik, I tried to plot each column separately by tweaking the code mentioned in 1
All i got was the same plot with red color for each point with a failure to change the shape when using the aes() function for each column separately.
Thanks and Regards,
Yogesh

Resources