How to insert a line similar to a Trend Line in Spotfire? - spotfire

Is it possible to add a 45-degree straight line over an existing scatter plot in Spotfire? If yes, then how?
A straight line like in the given image

The easiest way of adding an overlay is to use the functionality in the "Lines & Curves" property page. In there, there is a variety of different overlays that can be added. In the image below, I have added a "Curve draw" line to the plot.
If none of the available overlays is an immediate fit for you, then you migth be able to use the "Line from column values" or the "Curve from data table" options. The content of such a data table or column can be calculated from a data function if desired.

Just write "x" in the Curve expression box (available under "Lines & Curves" property's "Curve draw" option). It will plot a 45 degree straight line over an existing scatter plot.

Related

How can you remove/add specific grid line in excel diagram?

So, I want to keep only 1 red axis line. By default it shows or removes both of them, shows 1 line for each "row".
Don't know how to change my excel to english, sorry.
You need to use some tricks for this. Use an XY Scatter chart and plot the two lines as two series, one for the horizontal line, one for the vertical line.
Then format the axes to the desired maximum and remove all the grid lines.
If you want only specific numbers to show on the axes, remove the axis labels altogether and use data labels for data points instead.

Need to add dotted lines in scatteplot Excel

I created the below graph doing a scatteplot in excel then inserted the grey dotted lines by designing them one by one. I was wondering if this could be done automatically by inserting the data serie for the dotted lines into the chart.
Yes you can do something close to it, by combining a Scatter Plot chart and a Stacked Column chart.
So result will be something like this:
Step by Step guide to create the chart.
The data looks like this:
Mark the first part of the data, where the column "Data Bar" will be the difference between your two scatter plot values. It will represent the "area" between your scatter values. Choose to plot a "Stacked Column" Chart.
Hide the lowest part of your "Stacked Column" by click on the "blue part" of the bar which I named "Hidden Bar". Go to "Format Data Series" and choose "No Fill".
Add the part that will be your data for the "Scatter Plot". For me it was the column LowerBoundBar and UpperBundBar.
Your graph should now have four layers of Stacked bar. Go and change the Chart type by clicking "Change Chart Type".
Here is where the magic happens. Go down to Combo. Choose the two first to still be "Stacked Column". The last two series should be "Scatter". Your options should look like the picture below.
Time to modify your chart so it looks a bit nicer. Mark the clustered bars that represent "Data Bar" values. Go to "Series Option". Maximize "Gap Width". It will make your clustered bars thinner.
Time to get rid of the orange color. Go to "Fill & Line" option and choose "Pattern fill". Use the horizontally dotted line (marked with yellow).
Then go down to Border options (lower in the picture). Choose to use white border and make them a bit thicker by increasing "Width".
Finally you might need to resize the whole chart (the outer circles in the big chart in picture below) so the lines shows up better. If the whole graph is to small it will only be white. If it's to big it will show two parallel dotted lines.

Excel: Z-Order of Series in Chart and Legend

I have a combo chart in excel, with clustered bar charts (for a box plot) and lines. I am trying to display the bar charts/box plot in front of the lines, but am able to do so.
I tried moving the bar charts to the top and/or bottom in "select data" - but no change.
Any suggestions?
Am using Excel 2013.
Thanks!
I believe it is not possible. You can change display ordering of Excel series by:
changing the plot order of the series (this is what you have done in the "Select data" dialog),
changing the axis on which the series are displayed (series on secondary axis are displayed over the series on the primary axis).
But from my experiments no combination of changes makes the lines appear behind the columns.
There are two workarounds that might or might not help you:
you can create two charts on top of each other and put the chart with the lines behind the one with the columns,
or you could create a line chart (most likely you would need scatter chart), that is not a single line but a series of segments where the columns are not shown (this one is not that easy to do)
What are the lines for? If you are just trying to identify some zones along the value axis, you could instead use stacked areas, which would give a banded appearance. Areas are always drawn behind bars and columns, while lines are always drawn in front of lines and columns.

Excel chart with countries in y-axis, % in x-axis, circles as markers and control groups

Do you know if this chart, as shown in the following image, can be done in Excel?
Chart:
I don't even know how this kind of chart is named, so I cannot search in the web for tutorials. I don't need to display three points on every row as in this chart (one is enough), and even I can mark the control group manually.
Yes this can be done in Excel.
If you want vertical orientation like on the picture above, then you should probably use the Scatter chart with quite some modifications. You would set the x values of the series to your values and the y values can be just 1,2,3,4,5.... The biggest problem with this approach would be how to display the correct categories. There is a tool to help you do that and it is discussed here: https://superuser.com/questions/485883/how-to-create-dynamic-scatter-plot-matrix-with-labels-and-categories-on-both-axi
For horizontal one you can use a normal line chart - with hidden line and only markers visible (Excel doesn't support vertical line graphs).
Even three groups are easy to do, you just need to add three series and format them accordingly.
The lines are also quite easy to do, you add minor / major gridlines to the chart and then format those as well.

How to draw line X=1?

I know how to draw a line with scatter plot options where X is the independent and Y the dependent variable.
In the scatter plot of that data I need to add another line: X=2. I have the following data:
But how to draw a line X=1 ?
Maybe you want something like this:
I hear that charting is more different than many other aspects of Excel between versions and that perhaps my version (Excel 2007) is one of the least ‘friendly’ hence some of the reason for “not very easy” but the principle is as #Bill the Lizard has described. In view of some weird behaviour with (my?) Excel 2007 however I recommend being careful about the sequence in which the lines are drawn.
First I suggest getting your chart right for all aspects but the green line. Then add another series with X values of 1 and 1 and Y=2 values of 10 and -2 (or whatever the limits are of your chosen y-axis as displayed). Select and copy that array (four cells) select your chart and Paste Special…, and Add cells as New Series, Columns, Categories (X Values) in First Column, OK.
This should add a vertical line of the same chart type as the existing (ie XY (Scatter) Scatter with Straight Lines and Markers). The colour can be changed, by selecting that series (click on it and Format Data Series…, Line Color etc) and presumably you would want the markers removed. It was these that for me at first refused to disappear to order – but persistence paid off. Click on either of the data points, and under Marker Options choose none for Marker Type. If necessary, repeat for the other data point – and keep repeating if required!
Also, I selected what was showing as Series3 (text) in the legend and deleted that.
Forgot to mention that for anything to do with Excel charts Jon Peltier is the ultimate authority (eg) and that an alternative approach is to use an error bar and a secondary vertical axis.

Resources