Multiple labels in cgScatter2D? [message #88420] |
Wed, 23 April 2014 13:41  |
Jonas Ardo
Messages: 12 Registered: April 2014
|
Junior Member |
|
|
Hi
I run
pro NPPplot
compile_opt idl2
NPP = READ_CSV('file.csv', HEADER=NPPheader)
cgWindow, WXSize=600, WYSize=600
cgScatter2D, NPP.FIELD2, NPP.FIELD3, /ISOTROPIC, /NODISPLAY, FIT=0,
XTitle= NPPheader[1], YTitle= NPPheader[2], XRange=[0,700],
YRange=[0,700], $
PSym=16, /Window, /Coefficient, Charsize=1.3, /GRID
cgControl, Create_PNG='C:\idlfiles\GPP\NPP.png'
END
The plot created looks OK in th resizealble graphic window but have
multiple lables (i.e. 200, 400 etc are shown twice on the x-axis and
y-axis) in the PNG file and if I save a PDF from the resizealble
graphic window.
Suggestions?
/Jonas
|
|
|
Re: Multiple labels in cgScatter2D? [message #88421 is a reply to message #88420] |
Wed, 23 April 2014 13:54   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jonas Ardo writes:
> I run
>
> pro NPPplot
> compile_opt idl2
>
> NPP = READ_CSV('file.csv', HEADER=NPPheader)
>
> cgWindow, WXSize=600, WYSize=600
>
> cgScatter2D, NPP.FIELD2, NPP.FIELD3, /ISOTROPIC, /NODISPLAY, FIT=0,
> XTitle= NPPheader[1], YTitle= NPPheader[2], XRange=[0,700],
> YRange=[0,700], $
> PSym=16, /Window, /Coefficient, Charsize=1.3, /GRID
>
> cgControl, Create_PNG='C:\idlfiles\GPP\NPP.png'
>
> END
>
> The plot created looks OK in th resizealble graphic window but have
> multiple lables (i.e. 200, 400 etc are shown twice on the x-axis and
> y-axis) in the PNG file and if I save a PDF from the resizealble
> graphic window.
>
> Suggestions?
I use these instructions to figure out problems like these:
http://www.idlcoyote.com/code_tips/fixcoyoteprogram.php
Specifically, when was the last time you updated your Coyote Library?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
Re: Multiple labels in cgScatter2D? [message #92876 is a reply to message #88421] |
Wed, 16 March 2016 11:45   |
chengyuxi34
Messages: 4 Registered: January 2016
|
Junior Member |
|
|
Hi, David
Thanks for earlier help and quick respond in general.
I run into the same problem. If I try to set xrange or yrange when using cgScatter2D.pro, there would be two labels in the output file
Example:
-------------
> pson,filename='temp.eps'
> cgscatter2d,findgen(30),findgen(30)+0.1,xrange=[-1.0,31]
> psoff
-----------
It also confused me that I was not able to use cgControl.pro to output a plot. When I used cgControl, it went through, but no file was ever generated.
Thanks,
Chengyu
On Wednesday, April 23, 2014 at 4:54:22 PM UTC-4, David Fanning wrote:
> Jonas Ardo writes:
>
>> I run
>>
>> pro NPPplot
>> compile_opt idl2
>>
>> NPP = READ_CSV('file.csv', HEADER=NPPheader)
>>
>> cgWindow, WXSize=600, WYSize=600
>>
>> cgScatter2D, NPP.FIELD2, NPP.FIELD3, /ISOTROPIC, /NODISPLAY, FIT=0,
>> XTitle= NPPheader[1], YTitle= NPPheader[2], XRange=[0,700],
>> YRange=[0,700], $
>> PSym=16, /Window, /Coefficient, Charsize=1.3, /GRID
>>
>> cgControl, Create_PNG='C:\idlfiles\GPP\NPP.png'
>>
>> END
>>
>> The plot created looks OK in th resizealble graphic window but have
>> multiple lables (i.e. 200, 400 etc are shown twice on the x-axis and
>> y-axis) in the PNG file and if I save a PDF from the resizealble
>> graphic window.
>>
>> Suggestions?
>
> I use these instructions to figure out problems like these:
>
> http://www.idlcoyote.com/code_tips/fixcoyoteprogram.php
>
> Specifically, when was the last time you updated your Coyote Library?
>
> Cheers,
>
> David
>
>
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
|
|
Re: Multiple labels in cgScatter2D? [message #92913 is a reply to message #92908] |
Tue, 22 March 2016 07:40  |
rawahranger
Messages: 14 Registered: March 2016
|
Junior Member |
|
|
> I thought I got the Coyote library fairly recently (late 2014) and was fairly up to the data. But updating the library does solve the problem.
Updating your Coyote Library nearly always works. :-)
Cheers,
David
|
|
|