Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Overlaying curves on top of an x-t contour plot
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
James Quirk  
View profile  
 More options Dec 16 2008, 4:39 pm
From: James Quirk <j...@galcit.caltech.edu>
Date: Tue, 16 Dec 2008 13:39:13 -0800 (PST)
Local: Tues, Dec 16 2008 4:39 pm
Subject: Re: Overlaying curves on top of an x-t contour plot
Carlos,

On Tue, 16 Dec 2008, Carlos wrote:

> How would one go about plotting a curve on top of a contour plot?

> Say we have a contour plot on an x-t diagram of say, pressure gradient
> generated by a script similar to what is seen in the previous thread:
> http://groups.google.com/group/amrita-ebook/browse_thread/thread/77b8...

> And we also have a file listing the x-t coordinates of a curve (say,
> the x-t coordinates of a particle path or a C+ characteristic). What
> is the best way to plot the curve on top of the contour plot? This can
> be done by dumping the results extracted by AMRITA  simulation into a
> program like MATLAB or Mathematica and having those programs do the
> plotting, but it may be better to do everything on the fly within
> AMRITA

> Right now I am thinking of plotting the curve using the "line" command
> to connect the points (connecting the first point in the x-t file to
> the second point, taking the second point and connecting it to the
> third and so on) and overlaying what I get onto the contour plot (of
> say pressure gradient). Would this be the right approach to take?

> On a related note, is there a way to draw the lines differently, for
> example making some lines slightly thicker than other lines, or adding
> colour to the lines? Say we wanted to plot many C+ and C-
> characteristics together. If we plotted a lot of those lines together,
> the result could be a jumbled mess, and we want to colour code it so
> that the C+ is red and the C- is blue. Is there a way to do something
> like this within AMRITA?

You can overlay a segmented curve using the commands:

     move x,y
     draw x,y
     line x1,y1,x2,y2

The lines will be drawn using the current colour, which is set
using the commands:

     m
     rgb
     hls

There isn't a command to set the line width directly, but you can change
the width by injecting raw PostScript into the plot file. For details,
check out the manual page for amrita:gl::ps .

If the built-in functionality is not sufficient, I would suggest you use
either Metapost or Asymptote to build an overlay. Both of these packages
are free and so are more accessible to people like myself who
cannot afford a Matlab licence.

James

> Thanks,
> Carlos


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google