Re: How to add the grid to a figure [message #62452 is a reply to message #62450] |
Tue, 09 September 2008 07:14  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
duxiyu@gmail.com writes:
> I want to wrtie a procedure to get the similar plot as it below.
> http://lh6.ggpht.com/duxiyu/SMZ8O2FYDRI/AAAAAAAAACo/HCWygAzv Y60/sample.png
> Is there a simple method to add the dashed grid like that?
>
> The vertical dashed lines are easy to be added, becase the duration
> for all data is three hours and the interval between tow vertical
> lines is 3 min.
> Therefore, it is easy to use a loop to plot them.
>
> But I cannot find a universal method to plot the horizontal dashed
> lines.
> Becase for different data interval, the Y values are different for
> each other.
> The values of horizontal lines are equal to the major ticks.
> Meanwhile, according to the different data set, IDL selected the
> different major ticks.
> So it is difficult for me to build the procedure which can be applied
> to all the data.
Here is an article:
http://www.dfanning.com/graphics_tips/grid.html
You can also use the [XYZ]Tick_Get keywords to get the
major tick values.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|