Thanks Alan
I've hunted through the code and found that although some properties appear to be able to be set before initialisation they are saved in the plstream and the commands don't make it to the drivers until after plinit is called at least (because until this point the driver doesn't even exist). plwidth() had the following comment though:
// Set pen width. Can be done any time, but before calling plinit is best
// since otherwise it may be volatile (i.e. reset on next page advance).
// If width < 0 or is unchanged by the call, nothing is done.
Is the implication that if the user sets the pen width before initialisation that this pen width should be used at the beginning of each page? I've scanned through the svg and cairo code and this doesn't appear to be the case for these drivers and such functionality is not documented in the manual.
In case anyone is interested in the progress of this work, I've modified the wxwidgets driver so that the wxWidgets window runs in a seaparate thread to the main thread where calls to the plplot functions occur. This is now functioning for the three backends on Windows, however freetype is not yet running. It has beens uch a large job because event driven functions in the wxFrame must not access the plstreams while the main thread is doing so. This either requires protecting the plstreams with mutexes or simply not accessing the plstream from the window. I've gone for the second option as I think the first is a huge job, especially given the use of the global plsc pointer. It turns out that plfreetype.c makes use of the plstream a lot so that's the next big task.
There are some more minor items that i haven't yet tackled, such as setting custom keypress behaviour. I think the best (maybe only) way to do this would be to add extra options to the escape function calls so that when some options are set they can be sent from the plstream to the driver where it is easy to control communication, rather than have a window event have to poll the plstream, which can cause race conditions. Unless someone on the list tells me that this shouldn't be done I'll go ahead with this approach.
Alan - off topic, that sounds like some very interesting work, I guess we won't hear from you much in the near future then.