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 
Switch to threaded view of this topic Create a new topic Submit Reply
Isotropic keyword in plot (function graphics) [message #94403] Wed, 10 May 2017 12:28 Go to next message
laura.hike is currently offline  laura.hike
Messages: 87
Registered: September 2013
Member
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?
Re: Isotropic keyword in plot (function graphics) [message #94404 is a reply to message #94403] Wed, 10 May 2017 12:39 Go to previous messageGo to next message
Burch is currently offline  Burch
Messages: 28
Registered: December 2013
Junior Member
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
Re: Isotropic keyword in plot (function graphics) [message #94405 is a reply to message #94404] Wed, 10 May 2017 13:37 Go to previous messageGo to next message
laura.hike is currently offline  laura.hike
Messages: 87
Registered: September 2013
Member
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
Re: Isotropic keyword in plot (function graphics) [message #94406 is a reply to message #94405] Wed, 10 May 2017 15:10 Go to previous messageGo to next message
laura.hike is currently offline  laura.hike
Messages: 87
Registered: September 2013
Member
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
Re: Isotropic keyword in plot (function graphics) [message #94408 is a reply to message #94406] Thu, 11 May 2017 00:59 Go to previous messageGo to next message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
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.
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 next 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
Re: Isotropic keyword in plot (function graphics) [message #94411 is a reply to message #94410] Thu, 11 May 2017 04:32 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
> Should using the ASPECT_RATIO keyword in the original call not work to
> your satisfaction, try

In principle, it should do.
In addition, you can always tune the axis appearance by using RANGE and STYLE keywords, at or after the initial call.
You also can do some final tuning interactively (SHIFT + LEFT mouse), as needed.
alx.
  Switch to threaded view of this topic Create a new topic Submit Reply
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 10:58:12 PDT 2025

Total time taken to generate the page: 0.00482 seconds