How can I extend a line from two points to the edges of the plot area using Core Plot? - objective-c

I'm using Core Plot to graph linear equations.
I would like to be able to supply two different data points and have a line drawn between them, but also extrapolated beyond the points themselves so that the line extends all the way to the edges of the plot area.
For example, given a 20x20 plot area with the origin centered and points at -5,-5 and 5,5, the line (green below) would extend all the way from -10,10 to 10,10 (blue below).
Is this possible? Is the best option just to find the plot range (which will be different each time) and find two points that are outside of it? I'm not sure if this will work; I have user interaction enabled and I want to make sure that the user can't accidentally pan far enough that the line will end.

Your idea of finding two endpoints outside the plot range is what I'd do. If you've limited the scrolling range, just pick points at the limits of that range. If not, you'll need to monitor changes to the plot space ranges with a plot space delegate and update the plot as needed.

Related

What is the name of this plot?

I would like to redo this plot, which was published in one of the newspaper about Covid 19 death toll. I am not sure what kind of graph is this, I am assuming this is percent stacked area plot.
It is probably a streamgraph of some kind. So, a streamgraph is a type of stacked area chart. It represents the evolution of a numeric variable for several groups. Areas are usually displayed around a central axis, and edges are rounded to give a flowing shape.
I found it hard to install streamgraph from git hub repository, however, there is a ggplot alternative available called "ggTimeSeries". Below is the link for streamgraph R documentation.
https://www.r-graph-gallery.com/streamgraph.html

making mean points in boxplot bigger and connecting them to each other

is there any way to increase and change the color of the mean points in boxplot matplotlib? I am showing the mean points by setting showmeans=True in box plot, but I can not find how to change the color of the points or increase their sizes. The green points are my mean points. In addition, is it possible to connect them and have a line between them?

Circular panning with matplotlib

I'm looking for a way to have interactive "circular panning" with matplotlib: when
interactively moving the axes to the left or the right, I want the data
(and axes labels) to "wrap around". (An (silly) example application would
be e.g. plotting annual average temperatures, and wanting to look at
whether anything special is happening around New Year.)
Is there a simple way to achieve this?

How should I determine how far apart the markers of two points are?

In Matplotlib, is there an idiomatic way to tell how far apart two markers are with the present zoom level and marker style? Or, even better, is there a way to determine how much two markers overlap?
The reason I'm asking is that I'm making some plots that are sort of like scatter plots, wherein two points at the same coordinate (or very very nearby) has significant meaning, and it's important that I know when the (identical) symbols used for the points obscure each other. I want to determine the degree to which the symbols (again, for the chosen symbol type, size and zoom level) overlap, and amend the plot with some text to signify the degeneracies.

How to move a Core Plot graph

I have a Core-Plot Graph within a Mac Application. But the inside table is appearing shifted down and to the left of the containing "frame/border" so that neither of the axis' are showing. I cannot figure out how to change this does anyone know what parameters I need to change to fix this?
Update: Sorry I did not realize I could upload an image, I have done so know and will try your suggestions in the mean-time.
Not sure what you mean by "inside table". It would be easier to offer suggestions if you could post a screenshot.
Without seeing what's wrong, here are some common areas to look at:
If you haven't already done so, look at the example apps included with Core Plot for ideas. The Plot Gallery app has many sample plots and the others are useful, too.
You may need to add padding (paddingLeft, paddingBottom, etc.) on the graph and/or plot area frame. Padding the graph pushes everything in away from the edges of the graph. Padding the plot area frame pushes the plot area in so the axes and titles can hang outside the plot area (the area where the plots are drawn).
If you want to keep an axes pinned to a specific place, e.g., the edge of the graph, set up a floating axis. Otherwise make sure the orthogonal coordinate is set (it defaults to 0). For example, the orthogonal coordinate for the x-axis is the y-value where the x-axis crosses the y-axis.