[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: line graph problems
Brian (nagybria_ns@msu.edu) writes:
> I have a couple of problems I was hoping that someone might be able to
> help me with...
>
> First of all I am trying to automate the process of creating a series
> of line graphs for a project (approximately 50). I could do this in
> Excel, but it is very time consuming. I was hoping to use IDL to make
> the process easier, but it seems to be causing me just as many
> headaches.
>
> There will be two plots per page and they have identical y-axis and
> variable x-axis ranges. The x-axis values are fairly large, which
> leads me to my first problem. Is it possible to change the text
> orientation for an axis using PLOT? I've searched the IDL help and
> David's book and can't seem to find any reference to this. I'd like
> to have the text display at a 45 degree angel so the values don't
> overlap when displayed.
There is no way to do this directly with the PLOT
command, but there is a little program described on
page 94-96 of my book (as long as you have it) that
shows you how easy it is to do it. You will have to
modify the function for your purposes, probably.
> My second problem relates to the y-axis. In
> several of my plots I have a few y values that are large while the
> rest are many times smaller. Is it possible to create a broken y-axis
> so I can bring out the smaller values while still displaying the
> larger ones?
You can pretty much do anything you like with IDL, but
this one is also going to take a bit of programming
muscle. The trick will be knowing how to draw two
plots, one above the other. Then you will need to
connect the separate Y axis with some kind of zigzag
line (PLOTS will be used for this). Again, all the
necessary keywords to the PLOT command are described in
my book (POSITION, YNOZERO, [XY]STYLE, etc.]. You will
just have to hack something together. I wouldn't expect
it to take more than 15-20 minutes.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155