Re: speed of polyline plot

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Aug 14 2013 - 18:25:42 MDT

Hi Lijun,

We are working on ways to speed up the polyline code, and actually, I think the code is already done. We just haven't released it to the general public yet.

In the meanwhile, you can try this modified version, which just draws the shapefile outlines instead of attaching them.

When you attach them, this gets real slow because it has to create a new object for every polyline you attach, which is 2000 segments, for each of your 400 pictures.

The only issue with using this code is that if you resize the plot later, like for a panel plot, then it won't work because the lines are not attached to the plot.

To use this code, you want to change your code from something like this:

  poly = gsn_add_shapefile_polylines(wks,map,shp_filename,pres)

to something like this:


Make sure you include:

load "./gsn_shapefile_polylines.ncl"

at the top of your script, after any other load commands.


On Aug 10, 2013, at 3:48 PM, Lijun Diao wrote:

> Hi, there:
> I am adding roads onto my contour plot by gsn_add_polyline. . My is domain state size. I already extracted the roads segements from the shape file downloaded from national atlas. Since there are still 2000 segments left for plotting, the time for one plot is about 2 min. I am plotting around 400 pictures, so the totally plotting time is unbearable (half day). gsn_add_shapefile_ploylines doesnĄ¯t work. Is there a fast way to do it then?
> -----------------------------------------------------------------------------
> Lijun Diao
> Research Assistant
> Department of Earth & Atmospheric Sciences
> University of Houston
> 4800 Calhoun RD., Bldg. S&R1-312
> Houston, TX 77204-5007
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:

Received on Wed Aug 14 18:25:50 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 14 2013 - 18:35:09 MDT