comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Isotropic keyword in plot (function graphics)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Isotropic keyword in plot (function graphics) [message #94410 is a reply to message #94408] Thu, 11 May 2017 03:27 Go to previous messageGo to previous message
Markus Schmassmann is currently offline  Markus Schmassmann
Messages: 129
Registered: April 2016
Senior Member
On 05/11/2017 09:59 AM, alx wrote:
> Le jeudi 11 mai 2017 00:10:33 UTC+2, laura...@gmail.com a écrit :
>> Tried aspect_ratio, but it doesn't work well. It _does_ change the
>> aspect ratio, as desired, but since the tick marks and labels are
>> applied in the original plot call, they end up smushed on the
>> reformatted plot. I could fix this by redoing the tick marks and
>> labels, but this is starting to be a poor use of time.
>>
>>
>>
>> On Wednesday, May 10, 2017 at 1:37:45 PM UTC-7, laura...@gmail.com
>> wrote:
>>> Thanks for the suggestion. I suppose I could start the plot,
>>> then calculate xrange/yrange (or the other way around) and use
>>> this in the aspect_ratio property after the fact. Doing it
>>> afterward hadn't occurred to me, and it wasn't clear how to do it
>>> upfront because every plot is different. So that should work.
>>> Still, it would be nice not to add two extra steps.
>>>
>>> Hmmm, actually, it would be nice if the axis steps (size of a
>>> cell of size 1) were the same in every plot, but again, the range
>>> is different from plot to plot. I'll think about a way to do
>>> that with "dimensions," although in this case I'm letting IDL
>>> pick the axis range and dimensions has to be specified in the
>>> original call.
>>>
>>>
>>>
>>> On Wednesday, May 10, 2017 at 12:39:31 PM UTC-7, Jeff B wrote:
>>>> On Wednesday, May 10, 2017 at 2:28:43 PM UTC-5,
>>>> laura...@gmail.com wrote:
>>>> > It seems that the "isotropic" keyword is not allowed for the
>>>> > "plot" command in the new function graphics. Is there any
>>>> > alternative? This was a very useful tool for keeping plots
>>>> > realistic. Is there any alternative?
>>>>
>>>> The aspect_ratio property may suit your needs:
>>>>
>>>> https://www.harrisgeospatial.com/docs/plot.html#ASPECT_R
>>>>
>>>> -Jeff
> Just use ASPECT_RATIO keyword in the original call. alx.

Should using the ASPECT_RATIO keyword in the original call not work to
your satisfaction, try

x=[0.:2.:.01]*!dpi
y=sin(x)
p_temp=plot(x,y,/buffer)
x0=p_temp.xrange[0]
x1=p_temp.xrange[1]
y0=p_temp.yrange[0]
y1=p_temp.yrange[1]
scale=100

p=plot(x,y,xrange=[x0,x1],yrange=[y0,y1], $
dimension=[x1-x0,y1-y0]*scale+100, $
position=[0,0,x1-x0,y1-y0]*scale+50,/device)

Depending on your plot, you might want to manually calculate your
ranges, that often looks better.

I hope this is what you are looking for, Markus
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: change colors on colortable
Next Topic: How to get all graphics elements in a Window?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:07:19 PDT 2025

Total time taken to generate the page: 0.00486 seconds