Line Chart leaving gaps in data - apache-flex

I have a Flex line chart where I allow the user to change the y axis ranges. When a data point falls outside the ranges, the chart drops the line segments on either side of the out of range point leaving a gap in the data line.
I'm currently using the data function to clamp the values out of range to the y axis min/max, but this displays misleading data.
Is there a way to make it draw the lines to the y axis max/min point, making it look like the line goes off the plot?

There is a parameter filterDataValues in LineSeries - set it to "none" and it should do the trick.

Related

How to draw abline() that doesn't intersect the Y-axis in R?

I have a location quotient plot drawn in R and want to draw a horizontal line along the plot where Y = 1. I have the code abline(h=1, col="black") but when the line is drawn, it intersects the Y-axis and crosses out my Y-axis labels.
Does anyone know how to terminate the line at the Y-axis rather than having it intersect?
Many thanks.
As mentioned in the comments, it looks like the parameter xpd has been changed, so one option is to change it back to FALSE, see ?par. you can control the clipping region using the clip function to further limit the range that abline and other functions plot within. This may also be affected by you plotting device (different devices can deal with clipping differently).

ggplot - specify coordinate in middle of plot, regardless of scale

I would like to add a rectangle to my scatter plot to specify a region. I know I can do this by calling geom_polygon and specifying the X- and Y-coordinates of the corners. However, I would like to make sure the rectangle is always half (or another fraction) of the height of the plot, regardless of what the scale of the points on the plot is.
Is there any way I can specify the coordinates of the corners with something like "fraction of plotting region" as the unit?
The only other option I see is to try to predict the scale of the plot by looking at the min() and max() of the points that I am plotting and then calculating the coordinates for the box based on that, but that becomes a lot more complicated once you start faceting and so on...

ggplot error bar not showing on graph because it falls outside y axis limits [duplicate]

If I make a line plot (a time series, for example) and set my axis limits, I want the line to continue off the plot when points are outside of the axis limits, and then come back into the plot for the next point that is within the axis limits. Right now, it seems that ggplot2 will just drop the points completely and give me a an "Error:" message.
If you limit your axes by reducing the axis scale (scale_x_continuous(limits=...)), then that is the expected behavior. By adjusting the scale, you are defining what data should be part of the plot. If you want to use all the data, but just zoom in on a particular region of the axes, you want to use coord_cartesian(xlim=..., ylim=...) instead.

stop ggplot2 from dropping data points outside of axis limits?

If I make a line plot (a time series, for example) and set my axis limits, I want the line to continue off the plot when points are outside of the axis limits, and then come back into the plot for the next point that is within the axis limits. Right now, it seems that ggplot2 will just drop the points completely and give me a an "Error:" message.
If you limit your axes by reducing the axis scale (scale_x_continuous(limits=...)), then that is the expected behavior. By adjusting the scale, you are defining what data should be part of the plot. If you want to use all the data, but just zoom in on a particular region of the axes, you want to use coord_cartesian(xlim=..., ylim=...) instead.

How can one create a double horizontal axis for a plot in ggplot2?

I need to show the values on the horizontal axis (aka abscissa, aka x-axis) converted into other units. Hence the need for a second axis.
It is not currently possible. Hopefully after this summer.

Resources