I have a macro that produces graphs like this:
The data for the graphs looks like (100,0,0,94,0,132,0,126,115) and so on.
The dotted graph shows all the data (note the dots on the "floor", that's data with value 0). The lines connects the dots with values more than 0.
I have to do this using two graphs and it works but it's a bit messy at the bottom as two labels show for each color. The example above works ok but if you want to see more lines it gets really messy quick and hard to see. Is it possible to only show the dotted graph in the graph window but not the corresponding label? Basically I want one label per color at the bottom.
And yes, I know there's a graph with dots and lines but it doesn't work for me.
Since the data looks like (100,0,0,94,0,132,0,126,115) the lines looks like sawtooths going all the way back to 0 and then back up again. I want the lines to only show the data with value more than zero.
In your case, the simplest way would be to substitute all 0 values with =NA() function. Excel won't chart #N/A! values. You'll still see the category label in the axis, but Excel won't chart the actual zeros.
Related
As you can see in the image, I'm getting a lot of blank space on the right side of my graph. When I shrink the graph horizontally, it just shrinks my data. As a note, I have the axis set up based on text rather than date, since you can't choose weekly, so it was putting large gaps between my bars, which I was also trying to avoid.
I create a similar graph to yours and everything looks fine as you can see below. I also pasted axis options onto the screenshot for you to double check.
Also there may be some blank rows in the graph's scope which we cannot see on screen.
I'm sorry for the vague title, did not know how to title it otherwise. So I've got a huge set of data, about 7k lines. Basically, a table with 2 columns and 7000 lines. When I select the data + labels and go to Insert -> Scatter chart, only 1 point is shown on the graph, and the title of the graph is actually the last value. I've tried multiple fixes and no luck. Any ideeas?
Here's what it looks like:
chart image
Here's the spreadsheet if you need it (sorry it's on mega.nz, it's the only site that I know of that doesn't show popups etc.): the spreadsheet
I changed the graph type to the line and then returned it to what it was in the beginning it worked for me properly.
I wanted to make a dynamic chart that plots out the graph of a standard curve for a bio assay we perform frequently. Often to boost the fit of the curve you may drop one or two data points on either end of the data set. So using vlookups and if statements I have a scheme that performs that data trimming, such that my data always starts in Row 1 and the column length simply shortens.
My table works great, but my xy scatter chart goes bananas on these changes. I have the plot on a log log scale, which looks fine if the full data set is present. I lose the x axis detail when I perform a trim. The x- axis then resets to range of 1 to length of my data set.
How can I prevent this?
UPDATE
I added some information. I know there are VBA ways to do this but I would prefer to keep the spreadsheet as simple as possible. I would think excel should be able to handle this.
So if I have a bad fit I may want to trim the data series either from the beginning or end of the data set. I accomplish that with the spinner buttons to dynamically change the table but the following happens
My formula that updates the columns looks like the following. Its messy.
=IF(ISNA(IF(VLOOKUP(F6,$C$4:$D$11,2,FALSE)+1>8-($B$5-1),"",INDEX(C$4:C$11,VLOOKUP(F6,$C$4:$D$11,2,FALSE)+1))),"",IF(VLOOKUP(F6,$C$4:$D$11,2,FALSE)+1>8-($B$5-1),"",INDEX(C$4:C$11,VLOOKUP(F6,$C$4:$D$11,2,FALSE)+1)))
In the formulas use NA() instead of "". Filling cell with "" does not result in a true empty cell and is the reason why you are experiencing issues with your chart.
Hope that helps.
I may be missing the obvious here, but just hard-code the graph with a range of your choosing. In the sample screenshot, making the graph auto defaults the max range to 100,000. I went in and hard-coded the maximum to 50,000 (circled). Afterwards, the 5th data point is not displayed in the chart. Doesn't matter what the data shows at this point.
My problem is as follows:
The user inputs two numbers between 2 and 25, these numbers are used to create a grid. Every point on the grid has (x,y) coordinates. Based on the amount of points the user chose, my excel sheet is filled up with up to 25x25 (x,y) coordinates.
Example: A 6x7 grid is chosen by the user, the table is filled with 42 (x,y) coordinates and all other values in the table are set to "".
Now I want to use a scatterplot with lines connecting each array to plot the data.
Problem 1: If I only select the 6x7 part of the table that has values in it and create the scatterplot the result is correct. Until the user specifies a different grid, for example 8x9, then the graph is obviously missing two rows and two columns of input data.
Problem 2: If I select the entire 25x25 part of the table, including all the "" values, the graph axes get messed up. The y-axis works properly, but the x-axis shows sequential values (0-7) instead of the x-coordinates.
Problem 3: If I replace all the "" values in the table to 0 or NaN and plot the entire table the axes are correct, but the lines between the scatter data get messed up.
Question:
Is there a way to automatically change the input data for the plot, or is there a way to correctly display the values on the x-axis if I select all the data?
Not sure this will work in your case, but it's worth a try, especially since no one's addressed your post in 3+ hours. I've had success with this approach: 1) charting the largest data set, 2) copying the resulting chart, and 3) trimming the data it draws from to produce all smaller data sets.
To get this to work takes a lot of thought in laying out that largest data set so that all the other plots follow as needed. To illustrate, I've somewhat mimicked your data and in the animated gif I show largest data set, plus 2 others produced by copying it. Then I demonstrate how to make the second one, including the rescaling required to make all plots scaled equally. Notice that I've arranged things so that only one set of x-values feeds all the series. If you can do this, it makes working with the Excel's interface much easier.
After wrestling with it all night I came to the following solution:
Instead of setting all the empty cells to "" or zero the cells should be be set to #N/A (not available). The graph properly ignores the #N/A cells exactly like I want it to and updates when values are entered into them.
I have this excel's file:
As you can see i also made graphic for it.
The problem is that it is wrong, because i have 2 same "periodo" (201603)
in the graphic, and i don't want it. I want to see it only 1 time, but with 2 columns on it.
Like in this image: (sorry for paint).
I already tried anything: I searched on google and i aksed also to some friends. Please tell me where i'm wrong.
If something isn't clear ask me anything.
1) rearrange you data so that each series, or each bar if you bar is in its own column. See image below. Bob Cat and Dog are the series names. Dates are the axis labels, and the numbers of the series values.
2) make sure the vertical information is in the same row as the vertical information as the bar you want it grouped with.
3) right click on the graph and select "select data"
4) on the left hand side click add series. Select the additional columns for the bar height. make sure you include any blank above the data to keep the size line up with the previous.
5) your labels on the bottom will only show one thing. I would suggest you use your dates. Use your legend to apply series names to the colours.
Caveat: even when there are no values, the series still takes space.
Proof of Concept