Trend Line X Axis longitude problem

ShelleyBelly

New Member
Joined
Mar 2, 2011
Messages
44
Hello Everyone,

Many thanks in advance. I have an issue where by a data set on a XY scatter graph is joined with Linear Trend line. It is used to show the routes a ship takes and the scatter graph has a map as a back drop, x axis is longitude and y is latitude.

The longitude (x axis) starts at -180 (west) to +180 (east).

Now the problem is when i make a route (trend line) that heads east from the eastern side, and exceeds +180 i'd like the route to the trend line to go up to +180 and then continue from -180 on the same latitude. The same goes for heading west in the western hemisphere passing -180.

At the moment the trend line draws right across the entire graph. A good example would be heading from Hawaii to Australia which would mean heading west, but at the moment it draws all the way across the globe eastwards, which not the actual route that would be taken.

essentially the x axis should almost be consider continuous ending at is maximum but then starting immediately from minimum again at the same y axis value.

I hope this makes sense.

I could ofcourse place intermediate xy data points at +180 and -180 to give the appearance of the trend line exceeding the max x value before starting again from the minimum and vice versa, but if there is a way in VBA then i think this would be a cleaner and more useable solution for all.

Many Thanks in advance,

Tom
 
Last edited:

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Daft Idea, could you do your plots as normal but on a parallel line create a rule that reflects every entry, but where greater than 180, model as (180 - 360)
 
Upvote 0
Hi mole999,

Not sure I get your idea, could you explain bit more?

At the moment the chart plots everything correctly, its the trend line which is the issue.

Cheers,

Tom
 
Upvote 0
Ah, then what I was thinking isn't going to work, AFAIK Trend is purely left to right follow my chart link that site might know
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,691
Members
448,978
Latest member
rrauni

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top