NOAA   ERDDAP   Easier access to oceanographic data Brought to you by NOAA NMFS SFSC ERD    

Embed a Graph in a Web Page

If you are a web page author, you can embed ERDDAP's Make A Graph image URLs directly in your web pages with HTML <img> tags.
  1. In ERDDAP, search for a dataset of interest.
  2. Click on the dataset's graph link to see the Make A Graph web page.
  3. Modify the graph until it looks like you want it to.
  4. Specify the File Type (for example, .png) and get the URL from the "view the URL" textfield.
  5. Replace all instances of "&" in the URL with "&amp;".
  6. For gridded datasets, modify the URL to refer to the "(last)" date/time instead of a specific date/time.
  7. Make an img tag in your HTML document which refers to that modified URL, for example
    <img src="http://coastwatch.pfel.noaa.gov/erddap/griddap/erdBAssta5day.png?sst[(last)][(0.0)][(22.0):(50.0)][(225.0):(255.0)]&amp;.draw=surface&amp;.vars=longitude|latitude|sst&amp;.colorBar=Rainbow|C|Linear|8|32|" alt="SST, Blended, West US (Experimental, 5 Day Composite)">

    Or, if you want to be fancy, here is an example that includes "largest" and "edit" links.
    Note that the URLs have different file extensions (.largePng, .graph, and .png).

    <a href="http://coastwatch.pfel.noaa.gov/erddap/griddap/erdBAssta5day.largePng?sst[(last)][(0.0)][(22.0):(50.0)][(225.0):(255.0)]&amp;.draw=surface&amp;.vars=longitude|latitude|sst&amp;.colorBar=Rainbow|C|Linear|8|32|">largest</a>
    <a href="http://coastwatch.pfel.noaa.gov/erddap/griddap/erdBAssta5day.graph?sst[(last)][(0.0)][(22.0):(50.0)][(225.0):(255.0)]&amp;.draw=surface&amp;.vars=longitude|latitude|sst&amp;.colorBar=Rainbow|C|Linear|8|32|">edit image / download data</a>
    <br>
    <img src="http://coastwatch.pfel.noaa.gov/erddap/griddap/erdBAssta5day.png?sst[(last)][(0.0)][(22.0):(50.0)][(225.0):(255.0)]&amp;.draw=surface&amp;.vars=longitude|latitude|sst&amp;.colorBar=Rainbow|C|Linear|8|32|" alt="SST, Blended, West US (Experimental, 5 Day Composite)">

    That example makes these links and this image:

    largest edit image / download data

    ERDDAP: SST, Blended, West US (Experimental, 5 Day Composite)


DISCLAIMER OF ENDORSEMENT
Any reference obtained from this server to a specific commercial product, process, or service does not constitute or imply an endorsement by CoastWatch, NOAA, or the United States Government of the product, process, or service, or its producer or provider. The views and opinions expressed in any referenced document do not necessarily state or reflect those of CoastWatch, ERD, NOAA, or the United States Government.

DISCLAIMER FOR EXTERNAL LINKS
The appearance of external links on this World Wide Web site does not constitute endorsement by the Department of Commerce/National Oceanic and Atmospheric Administration of external Web sites or the information, products or services contained therein. For other than authorized activities, the Department of Commerce/NOAA does not exercise any editorial control over the information you may find at these locations. These links are provided consistent with the stated purpose of this Department of Commerce/NOAA Web site.

DISCLAIMER OF LIABILITY
Neither the data providers, ERD, CoastWatch, NOAA, nor the United States Government, nor any of their employees or contractors, makes any warranty, express or implied, including warranties of merchantability and fitness for a particular purpose, or assumes any legal liability for the accuracy, completeness, or usefulness, of any information at this site.

USAGE LIMITATIONS
The SeaWiFS images and data from this site may be used for free, but not redistributed; all other images and data from this site may be used and redistributed for free.

CONTACT
Please email questions, comments, or suggestions regarding this web page to bob dot simons at noaa dot gov. We would really appreciate knowing if you use ERDDAP.
If a request doesn't work and you think it should, please send the request URL?query (the String from the "Just generate the URL" textfield in the Data Access Form).


NOAA NMFS SFSC ERD Privacy Policy