X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12 Aug 2016 02:25 AM by  anon
How do I draw curved or rotated axis?
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:2
New Member


--
12 Aug 2016 02:25 AM
    Hello everyone. I am not so familiar with map projections, and have no plan to be (since I've never encountered data requiring such knowledge), so I am not sure if there are solutions for this already. TL;DR: I want to draw THIS using New Graphics functions. I am dealing with a data, which is in 2-dimensional "polar" coordinate. I have 3 floating point arrays of identical dimensions, r(radial distance), t(azimuthal angle), and z(data. density, temperature, etc.). Data points are evenly spaced in both radial distances and azimuthal angles, both having inner and outer boundaries, like a small slice of doughnut. What I want to do is draw a density map, preferably using New Graphics functions. For this, I can use "contour" function, by using x=r*cos(t) and y=r*sin(t). Problem is, this function draws me a good density map, but the axes are always mutually perpendicular. When I have a data with t ranging from 0 to 0.5 radians, I can place a single axis to one side of sector, but the other axis stays awkwardly away from data image. I thought combining AXIS function and ROTATE function would work. but the rotate function rotates not only the axis itself, but the entire graphics. I couldn't get an axis with arbitrary directions on 2-d plane. Moreover, I need to draw axis for azimuthal angles, which is arc of a circle. I really don't know how to deal with this. Of course, I could use bunch of "POLYLINE" functions to create my own axis. But what I need is flexible, on-the-go solution, that I don't need to care when I resize the graphics, change data range, or whatever. I noticed MAP function's functionality is similar to what I am looking for, but what it provides are bunch of map projections, which is meant to "project" curved surface onto plane, which would require bunch of meaningless calculations before getting actual graph. So, does anyone know what do I need to do to draw SUCH plots? Thank you.

    Deleted User



    Basic Member


    Posts:143
    Basic Member


    --
    18 Aug 2016 11:33 AM
    An example that shows how to produce a similar plot is shown below: pro dj_forum_hojin_cho_curveplot compile_opt idl2 x = [10,25,33,61,65] y = [-85,-82,-81,-86,-83] z = [10, 20, 30, 40, 50] xgrid = findgen(10)*8 ygrid = findgen(10)-90 data= griddata(x, y, z, /grid, /sphere, /degrees, XOUT=xgrid, YOUT=ygrid) mpol = map('PolarStereographic', $ limit=[-90,0,-81,70]) c = contour(data, xgrid, ygrid, /fill, overplot=mpol, grid_units='degrees') cb = colorbar(TARGET=c, position=[.1,.1,.4,.14]) end
    You are not authorized to post a reply.