Draw vertical line in scatter plot? - excel

I'm using Libreoffice (but I think that this is similar in Excel) and I need to draw a vertical line in correspondence of the green points in this image:
Possibly follow the line style that I used in the legend. How can I do this?

In Excel you can use vertical error bars. If you want to have a line drop vertically to the axis, use the settings with Minus and 100%

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.

How do I change the color of dotted lines in an Excel graph?

In Excel, I want to change color of the dotted lines in a "Line with Markers" graph.
I clicked to format the legend and I chose a color in Border and it changed the color of the line only, and not the markers. How do I change both the line and markers color?
Click on the markers and not on the line. proceed with the same steps as with the line.
Right-click on the line (in the graph) and select Format Data Series. You'll get something looking like this (might differ depending on your version):
Here you can choose Marker Line Colour, Marker Shape (in "Marker Options"), Marker Inner colour (in "Marker Fill") and many other things. Hope that helps!

A target curve in Spotfire

In Spotfire, I am trying to draw three horizontal curves from columns in a different data table than my plot. These lines are supposed to be target lines. I know I can do this either in a combination chart or in Lines & Curves in properties.
However, I prefer not to do it in a combination chart as I have to add colouring and I get many distinct series when I add colouring to three different target lines.
So I tried doing this by adding a horizontal line in "Add > Horizontal Line > Line From Data Table". However instead of drawing a curve what this does is draw multiple horizontal lines for the slightly fluctuating values in this column. I have also tried other options in Lines & Curves but none seem to work. And this happens although I have matchedthe data tables.
Does anyone have an idea how I can draw these target lines while avoiding the situation linked below?
The situation now:
The red, purple and black lines are supposed to be 3 seperate lines.
I think you are very close. Try the Properties > Lines and Curves and then Add > Line From Column Values. You will need to specify the x and y axis from the data table.
This will not always work on a bar chart, as the x may not line up with your category axis on the bar chart. Your x-axis for the line will need to be the same as the category axis.

Flot charts: markings z-index?

Is there any way to access and manually set the z-index (for lack of better word) of the markings lines in a flot chart? Right now I am creating some markings on a line chart to use as thresholds (basic horizontal lines set to a specific value) and it's working great except when the markings happen to be lined up perfectly with the chart's grid lines. When that happens the grid line overlaps the marking line so it's hard to see the marking line. What I would like to do is manually set the marking line to be on top of the grid lines, but I can't figure out where to set that option (or if it's even possible).
Here is the markings array that I am creating (dynamically):
markings: [ { y2axis: {from: -20, to: -20}, color: "#848484", lineWidth: 2.5 },{ y2axis: {from: -12, to: -12}, color: "#848484", lineWidth: 2.5 } ]
Here is an image of the result (you can see the threshold at -12 is buried under the chart's gridline and appears almost like 2 thinner lines):
Thanks for any help or advice you can offer!
When drawing on the canvas there is no z-order. What is drawn later is drawn over older stuff. And when you look at the flot code (in the drawGrid() function) you see that the markings are drawn first.
There are a few different solutions / work-arounds here:
You make a local copy of the jquery.flot.js file and change the code so that the markings are drawn last in the drawGrid() function.
You remove the markings and instead generate a simple data series with the two endpoints and add it to your dataset (preferably before your real data series). Then your markings data series is drawn after the grid and before your real data series.
You draw the markings manually after flot draws the grid and before flot draws the plot for the data. (See the documentation.)

Extend horizontal line to edges of chart area

In Excel 2007 I have a chart with a horizontal line (data series) similiar to what this page shows. But, as you notice, the line starts and ends in the middle of the data point. So, if there are bars on the same chart, the horizontal line will not extend to cover the entire first and last bars. How can I extend the horizontal line to touch the chart edges on the left and right sides?
I tried putting in "dummy" points at the beginning and end of the data series that had zero values (for the bars). This looked good, but the x-axis numbering started at zero and ended at one more than my last real data point, which, in my case is unacceptable.
Oh, and I'm creating the charts in VBA, so I need a VBA solution (which may be the same as the manual solution, just coded). Thanks.
If you right click on the horizontal axis and go into axis options. At the very bottom under Position Axis: select "On Tick Marks"
I answered a similar questions here:
Bar and Line charts are not synced when in the same chart area
In the above question the user needed to move the line to the left, but you can do a similar thing for your case.
Use scatter chart for your line chart. Then you need to set the xvalues of the scatter chart to be a bit different than the ones for your column chart. So let's say that your x-axis numbering goes from 1 to 12. Then you should distribute your xvalues for scatter chart from 0.8 to 12.2. That moves the starting point a bit to the left (0.8 instead of 1) and the last point a bit to the right (12.2 instead of 12). The exact number that you should use will depend on your gap and overlap settings of the column chart.
I eventually found an answer here. This worked great for me and did exactly what I needed.

Resources