Cartographer is one of hose cards that has taken me a long time to try to wrap my head around. And while I don't think I'm a perfect expert, I do think I finally have a pretty decent grip on the card.
General - What are the plusses?
The first thing is, it's a cantrip. So it can't hurt you (except for terminal draw, triggering reshuffles (which cartographer will do more often than most things), getting hit by discard attacks, etc. etc.). But beyond this, what are the plusses?
A Comparison
I think it's useful to compare it to that old standard, Laboratory. Lab, on top of the cantrip, draws another card. Cartographer, instead, lets you look at the top four, discard any, and reorder the rest. Well, the big thing here is the discarding. If you discard nothing, lab was almost surely better for you. If you discard one, again, lab could have drawn one, you would have preferred it. But if you start discarding two or three (or four, though this is pretty rare), cartographer starts coming away as better quite a lot.
Tactics
This takes us to the bulk of the article - Cartographer is not SO much a card about strategic understanding (don't get me wrong, that is there too), but rather mostly a card that you need to understand tactically, which is what a large part of this article will focus on.
Discarding
So what do you discard? The obvious answer is bad cards. (Okay, maybe the obvious answer is tunnels). But what constitutes a bad card? Basically, how bad a card is depends on the relationship it has to the other cards in your deck; the worse it is in relationship to them, the more you want to discard it. Conversely (and more importantly, generally), the BETTER other cards are, the more you want to cycle through what it is you are looking at.
An Interlude to Strategy
The strategic poster-child for this kind of nuance is mountebank. In a mountebank war, you are trying to play that as many times as possible, particularly early on, so you will skip past everything and it's brother to get to it. And after the cursing is done, cartographer is really good to get past all those worthless curses and worth-not-so-much coppers. So in a mountebank game, you definitely want Cartographer over Lab (though, unsurprisingly, you generally want Hunting Party over either one...).
Basically though, strategically what you want for your deck is inhomogeneity AKA large variance AKA you want a big difference in quality between your cards. If your cards are pretty similar in value, Cartographer does you very little good (and lab is pretty darn excellent). But if they're very different, it can be stellar.
Reordering
The other big part of how you play Cartographer has to do with the reordering. Now, lots of times, it just doesn't matter. But there are lots of times when it does. This is particularly the case when you have other cantrips. The big thing here is to figure out what you need this turn, and what it is you need later. So with a hand of Gold-Silver-Copper-Cartographer-Province, you play that cartog, draw a great hall, and see Estate, Estate, Gold, Silver. You should obviously pitch the estates, and then move your silver on top of your gold - you only need $8 right now, that 9th coin won't help at all. But the difference between gold and silver might be of crucial importance.
Subtleties
Okay, but that is a bit of an obvious example. There are many things which are more subtle. For instance, if you have a Village in hand, along with a silver and 3 copper, and cartographer revealed gold-village-village-curse, you should probably ditch the curse, and put the gold on top. Lots of times I will see people put the extra cards first, because they'll get a 'better turn' this turn (particularly true if, say, one of the villages were a peddler...) The only other way that you MIGHT want to play it is to dump both the gold and the curse, and use your cantrips to draw through to the next card; you really only want to go for that if you're playing for a big engine and/or you KNOW that the card after is a draw card (say because you're an expert deck tracker and it's the last thing in your deck).
Expounding on this, there are going to be times where you actually want to keep one of the bad cards (this is not really a good use of cartographer, but it can happen). Consider an example where you have peddler-gold-gold-gold-cartographer, cartographer draws a copper, and then you see estate-platinum-gold-gold. You should just let stuff sit here. You need to use peddler, but you don't want to draw a good card, so let yourself draw the estate, buy that colony.
Now, an example like that is weird, because you shouldn't be playing that kind of deck with cartographer really. But similar examples will come up all the time, and you need to be able to say, okay, I am going to hang on to those bad cards. Much like paying 8 for an herbalist, it grinds against our internal instincts, but sometimes you need to do it.
The other thing you have to be worried about is triggering reshuffles - this can make you keep cards that you would otherwise pitch, or occasionally pitch borderline cards you'd otherwise keep.
Order of play
And here is the other big tactical point of playing cartographer. Like most filter-the-next-stuff cards (e.g. apothecary, pearl diver, lookout, scout, and, when you have spare actions, duchess and navigator), you want to play this before other cantrips, so you can work out exactly when you draw different things. Generally. But, if you already KNOW what is on your deck, and you want to keep it, then you want to play at least most of your other cantrips first, up to the point where the draw of the cartographer picks up the last known card of the deck. Sometimes - in fact, I'd say usually - you also want to hold back one cantrip in order to be able to draw something that you might dredge up in the next four cards.
Card Interactions
Note: I am not talking about Dark Ages cards here, having played very little with them.
Combos
Wishing Well
Cartographer turns Wishing Well into Lab, if you keep more than one card (you usually want to) to make a very nice non-terminal draw engine. By itself, this is decently strong but nothing to really write home about. Add in a strong non-draw terminal or two and you have a potent deck.
Tunnel.
It discards tunnels (and coppers and estates and maybe silvers at some point) and gets you to those golds faster. This is not very strong, though, without some more enablers. This could easily therefore also go down as a nombo.
Platinum
Yes. Okay, not really a combo, but it works pretty nice for colony games.
Cantrips in general
These are basically what let you use the ordering ability of cartographer.
Cursers
Cartographer wins you the war, then cycles past the curses in your deck. Win.
Nombos
(i.e. you think these work well, but in practice, it doesn't work out so hot).
Stash
Hey, it cycles you really really fast. Good luck getting so many 5s very fast though.
Apothecary
You'd think more filtering is better, but these generally just end up stepping on each others toes.
Scout
I'd say this is the same thing as apothecary, except moreso, but then nobody thinks scout is good 'better' than just about anything....
Anti-Combos
(i.e. these cards actively dislike each other)
Trader
You really don't want a silver flood here - you want variation in cards.
Terminal Draw
Like any other cantrip
Strong Trashing
Well, cartographer can skip worthless trashers later on, but if your deck is already all good cards, you don't need its effect so much (and there's probably something better)
Jack of All Trades
See the note on Trader. Also Jack already sifts for you, and is very mild terminal draw.