multiple sign in postscript output in direct graphics [message #85706] |
Wed, 28 August 2013 22:47  |
Xin Tao
Messages: 40 Registered: April 2011
|
Member |
|
|
Hi,
I seem to keep running into this problem when producing ps output using DG.
A sample code:
ps_start, 'a.ps'
plot, [0,1], [4.1e-8, 4.2e-8], /ystyle
ps_end
A screenshot of the output "ps" file can be found at:
http://staff.ustc.edu.cn/~xtao/pub/a.png
The problem is with the multiple sign in y axis labels. Is there any way to fix this? I have also tried this on a Windows machine, this kind of behaviour can be reproduced. I have even seen papers with figures just like that.
Thanks.
Xin Tao
|
|
|
Re: multiple sign in postscript output in direct graphics [message #85708 is a reply to message #85706] |
Thu, 29 August 2013 02:34   |
Fabzi
Messages: 305 Registered: July 2010
|
Senior Member |
|
|
Hi,
On 08/29/2013 07:47 AM, Xin Tao wrote:
> Hi,
>
> I seem to keep running into this problem when producing ps output using DG.
>
> A sample code:
>
> ps_start, 'a.ps'
> plot, [0,1], [4.1e-8, 4.2e-8], /ystyle
> ps_end
>
In this case I would multiply my y-axis values with 10^8 and indicate
the right units in the YTITLE, this would be much easier to read. But
this is just my opinion ;-)
|
|
|
Re: multiple sign in postscript output in direct graphics [message #85712 is a reply to message #85706] |
Thu, 29 August 2013 05:16   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Xin Tao writes:
> I seem to keep running into this problem when producing ps output using DG.
>
> A sample code:
>
> ps_start, 'a.ps'
> plot, [0,1], [4.1e-8, 4.2e-8], /ystyle
> ps_end
>
> A screenshot of the output "ps" file can be found at:
>
> http://staff.ustc.edu.cn/~xtao/pub/a.png
>
> The problem is with the multiple sign in y axis labels. Is there any way to fix this? I have also tried this on a Windows machine, this kind of behaviour can be reproduced. I have even seen papers with figures just like that.
That looks like a bug to me. Have you checked with ExelisVis?
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 sign in postscript output in direct graphics [message #85715 is a reply to message #85712] |
Thu, 29 August 2013 05:40   |
Xin Tao
Messages: 40 Registered: April 2011
|
Member |
|
|
I haven't. Maybe I should.
Xin Tao
On Thursday, August 29, 2013 8:16:07 PM UTC+8, David Fanning wrote:
> Xin Tao writes:
>
>
>
>> I seem to keep running into this problem when producing ps output using DG.
>
>>
>
>> A sample code:
>
>>
>
>> ps_start, 'a.ps'
>
>> plot, [0,1], [4.1e-8, 4.2e-8], /ystyle
>
>> ps_end
>
>>
>
>> A screenshot of the output "ps" file can be found at:
>
>>
>
>> http://staff.ustc.edu.cn/~xtao/pub/a.png
>
>>
>
>> The problem is with the multiple sign in y axis labels. Is there any way to fix this? I have also tried this on a Windows machine, this kind of behaviour can be reproduced. I have even seen papers with figures just like that.
>
>
>
> That looks like a bug to me. Have you checked with ExelisVis?
>
>
>
> 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.")
I
|
|
|
Re: multiple sign in postscript output in direct graphics [message #85722 is a reply to message #85715] |
Thu, 29 August 2013 06:19   |
Andy Sayer
Messages: 127 Registered: February 2009
|
Senior Member |
|
|
I noticed this too some time ago and assumed that was just what they'd decided to do... although think that an 'x' for the multiply sign would be nicer!
On Thursday, August 29, 2013 8:40:43 AM UTC-4, Xin Tao wrote:
> I haven't. Maybe I should.
>
>
>
> Xin Tao
>
>
>
> On Thursday, August 29, 2013 8:16:07 PM UTC+8, David Fanning wrote:
>
>> Xin Tao writes:
>
>>
>
>>
>
>>
>
>>> I seem to keep running into this problem when producing ps output using DG.
>
>>
>
>>>
>
>>
>
>>> A sample code:
>
>>
>
>>>
>
>>
>
>>> ps_start, 'a.ps'
>
>>
>
>>> plot, [0,1], [4.1e-8, 4.2e-8], /ystyle
>
>>
>
>>> ps_end
>
>>
>
>>>
>
>>
>
>>> A screenshot of the output "ps" file can be found at:
>
>>
>
>>>
>
>>
>
>>> http://staff.ustc.edu.cn/~xtao/pub/a.png
>
>>
>
>>>
>
>>
>
>>> The problem is with the multiple sign in y axis labels. Is there any way to fix this? I have also tried this on a Windows machine, this kind of behaviour can be reproduced. I have even seen papers with figures just like that.
>
>>
>
>>
>
>>
>
>> That looks like a bug to me. Have you checked with ExelisVis?
>
>>
>
>>
>
>>
>
>> 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.")
>
>
>
> I
|
|
|
|
Re: multiple sign in postscript output in direct graphics [message #85733 is a reply to message #85723] |
Thu, 29 August 2013 10:52   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
Okay, I tracked this down. It looks like if you use hardware/device fonts (!p.font = 0) then IDL automatically replaces any mathematical "x" characters with bullets.
For example:
set_plot,'ps'
!p.font = 0
plot, [0,1], [4.1e-8, 4.2e-8], /ystyle , title='xx!Mx'
device,/close
Why it does this, I have no idea, but it has been that way since at least 1992. If you use Hershey vector or Truetype fonts then you get the correct "x" symbol.
Now, I can go ahead and fix this so that for scientific notation on the axis tick marks it uses the "x" for all fonts. I don't want to fix the other issue with "!Mx" because people might actually be expecting these to be bullet characters.
Is anyone going to freak out if I replace the bullet characters on axis tick labels with "x" characters? Note that this behavior won't affect custom tick labels - only IDL generated labels. If you have custom tick labels that happen to have !Mx characters you will still get bullets, as you (presumably) expect.
-Chris
ExelisVIS
|
|
|
Re: multiple sign in postscript output in direct graphics [message #85735 is a reply to message #85733] |
Thu, 29 August 2013 11:05   |
Andy Sayer
Messages: 127 Registered: February 2009
|
Senior Member |
|
|
I think bullets -> x would be good, and would be happy with that fix. (The bullets have led me to have to manually edit axes several times over the years, I just never reported it as I thought that was expected behaviour.)
Andy
On Thursday, August 29, 2013 1:52:44 PM UTC-4, Chris Torrence wrote:
> Okay, I tracked this down. It looks like if you use hardware/device fonts (!p.font = 0) then IDL automatically replaces any mathematical "x" characters with bullets.
>
>
>
> For example:
>
>
>
> set_plot,'ps'
>
> !p.font = 0
>
> plot, [0,1], [4.1e-8, 4.2e-8], /ystyle , title='xx!Mx'
>
> device,/close
>
>
>
> Why it does this, I have no idea, but it has been that way since at least 1992. If you use Hershey vector or Truetype fonts then you get the correct "x" symbol.
>
>
>
> Now, I can go ahead and fix this so that for scientific notation on the axis tick marks it uses the "x" for all fonts. I don't want to fix the other issue with "!Mx" because people might actually be expecting these to be bullet characters.
>
>
>
> Is anyone going to freak out if I replace the bullet characters on axis tick labels with "x" characters? Note that this behavior won't affect custom tick labels - only IDL generated labels. If you have custom tick labels that happen to have !Mx characters you will still get bullets, as you (presumably) expect.
>
>
>
> -Chris
>
> ExelisVIS
|
|
|
|
|
|
|
Re: multiple sign in postscript output in direct graphics [message #88023 is a reply to message #85737] |
Wed, 12 March 2014 17:19   |
Phillip Bitzer
Messages: 223 Registered: June 2006
|
Senior Member |
|
|
OK, I'm digging up I'm an old thread, but, I'm still getting something odd:
set_plot,'ps'
!p.font = 0
Plot, dist(10), XTITLE='r (cm)', YTITLE='Awesomeness', YRANGE=[0, 3d4]
device,/close
I don't know, it looks like Greek to me :-)
Setting the font to one gives the correct y title.
Using Coyote Graphics gives me something even goofier:
cgPS_OPEN, file='test.png'
cgPlot, dist(10), XTITLE='r (cm)', YTITLE='Awesomeness', YRANGE=[0, 3d4]
cgPS_CLOSE
Again, specifying FONT=1 in the call to cgPS_OPEN fixes things.
I've filed a request for technical support, BTW.
|
|
|
Re: multiple sign in postscript output in direct graphics [message #88030 is a reply to message #88023] |
Wed, 12 March 2014 21:04   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Phillip Bitzer writes:
> OK, I'm digging up I'm an old thread, but, I'm still getting something odd:
>
> set_plot,'ps'
> !p.font = 0
> Plot, dist(10), XTITLE='r (cm)', YTITLE='Awesomeness', YRANGE=[0, 3d4]
> device,/close
>
> I don't know, it looks like Greek to me :-)
>
> Setting the font to one gives the correct y title.
>
> Using Coyote Graphics gives me something even goofier:
>
> cgPS_OPEN, file='test.png'
> cgPlot, dist(10), XTITLE='r (cm)', YTITLE='Awesomeness', YRANGE=[0, 3d4]
> cgPS_CLOSE
>
> Again, specifying FONT=1 in the call to cgPS_OPEN fixes things.
>
> I've filed a request for technical support, BTW.
*What* looks like Greek? Everything looks pretty normal to me. :-(
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 sign in postscript output in direct graphics [message #88038 is a reply to message #88037] |
Thu, 13 March 2014 10:09   |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
Phillip,
I confirm your results using the same Mac system. The strangest thing is that the text is normal when the YRANGE keyword is removed, or even when it is set to a more reasonable values of [0,30], It looks like an internal IDL problem. --Wayne
On Thursday, March 13, 2014 12:31:49 PM UTC-4, Phillip Bitzer wrote:
> Well, that's not reassuring. Here's what I get:
>
>
>
> Basic: https://www.dropbox.com/s/idqhcfxgcuxcb9m/idl.ps
>
>
>
> CG: https://www.dropbox.com/s/sadpfsj5e6l3szk/test.ps
>
>
>
> CG-PNG: https://www.dropbox.com/s/ytroet1iisiqbq2/test.png
>
>
>
> Basically, the axis title is (apparently) in a different font.
>
>
>
> Am I standing on an island here?
>
>
>
> IDL> help, !VERSION
>
> ** Structure !VERSION, 8 tags, length=104, data length=100:
>
> ARCH STRING 'x86_64'
>
> OS STRING 'darwin'
>
> OS_FAMILY STRING 'unix'
>
> OS_NAME STRING 'Mac OS X'
>
> RELEASE STRING '8.3'
>
> BUILD_DATE STRING 'Nov 15 2013'
>
> MEMORY_BITS INT 64
>
> FILE_OFFSET_BITS
>
> INT 64
|
|
|
|
|
Re: multiple sign in postscript output in direct graphics [message #88416 is a reply to message #88041] |
Wed, 23 April 2014 08:47   |
johnbharatmiller
Messages: 1 Registered: April 2014
|
Junior Member |
|
|
On Thursday, March 13, 2014 12:11:00 PM UTC-6, Chris Torrence wrote:
> I can reproduce the problem in IDL 8.3.1 on both Mac and Windows. Looks like a real bug to me. It must be related to either the "x" or the exponent, where it gets stuck in "math" mode. If I make the axis range smaller so it doesn't require scientific notation then the problem goes away.
>
>
>
> I'll log a bug and try to fix it for 8.3.1.
>
>
>
> In the meantime, as a workaround, try adding a "!3" at the start of your YTITLE.
>
>
>
> -Chris
>
> ExelisVIS
phew... I was going crazy overnight trying to figure this out -- glad to know it's 'just' a bug.
Chris, any idea of the timescale (weeks, months, years?) for the bug fix. Notice also in Phillip's dropbox test.ps plot that the axis labels appear to be drawn multiple times in slightly different fonts. (I see the same thing). Maybe another clue as to what's happening.
thanks,
John
|
|
|
Re: multiple sign in postscript output in direct graphics [message #88424 is a reply to message #88416] |
Wed, 23 April 2014 16:27   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Wednesday, April 23, 2014 9:47:44 AM UTC-6, johnbhar...@gmail.com wrote:
> On Thursday, March 13, 2014 12:11:00 PM UTC-6, Chris Torrence wrote:
>
>> I can reproduce the problem in IDL 8.3.1 on both Mac and Windows. Looks like a real bug to me. It must be related to either the "x" or the exponent, where it gets stuck in "math" mode. If I make the axis range smaller so it doesn't require scientific notation then the problem goes away.
>
>>
>
>>
>
>>
>
>> I'll log a bug and try to fix it for 8.3.1.
>
>>
>
>>
>
>>
>
>> In the meantime, as a workaround, try adding a "!3" at the start of your YTITLE.
>
>>
>
>>
>
>>
>
>> -Chris
>
>>
>
>> ExelisVIS
>
> phew... I was going crazy overnight trying to figure this out -- glad to know it's 'just' a bug.
>
>
>
> Chris, any idea of the timescale (weeks, months, years?) for the bug fix. Notice also in Phillip's dropbox test.ps plot that the axis labels appear to be drawn multiple times in slightly different fonts. (I see the same thing). Maybe another clue as to what's happening.
>
>
>
> thanks,
>
>
>
> John
Hi John,
So the original problem with the "bullet" character was fixed in IDL 8.3. That other problem with everything switching to greek is now fixed for IDL 8.3.1, due out hopefully sometime this summer.
Cheers,
Chris
ExelisVIS
|
|
|
Re: multiple sign in postscript output in direct graphics [message #88668 is a reply to message #88424] |
Thu, 29 May 2014 07:29   |
derek.posselt
Messages: 1 Registered: May 2014
|
Junior Member |
|
|
On Wednesday, April 23, 2014 7:27:05 PM UTC-4, Chris Torrence wrote:
> On Wednesday, April 23, 2014 9:47:44 AM UTC-6, johnbhar...@gmail.com wrote:
>
>> On Thursday, March 13, 2014 12:11:00 PM UTC-6, Chris Torrence wrote:
>
>>
>
>>> I can reproduce the problem in IDL 8.3.1 on both Mac and Windows. Looks like a real bug to me. It must be related to either the "x" or the exponent, where it gets stuck in "math" mode. If I make the axis range smaller so it doesn't require scientific notation then the problem goes away.
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> I'll log a bug and try to fix it for 8.3.1.
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> In the meantime, as a workaround, try adding a "!3" at the start of your YTITLE.
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> -Chris
>
>>
>
>>>
>
>>
>
>>> ExelisVIS
>
>>
>
>> phew... I was going crazy overnight trying to figure this out -- glad to know it's 'just' a bug.
>
>>
>
>>
>
>>
>
>> Chris, any idea of the timescale (weeks, months, years?) for the bug fix. Notice also in Phillip's dropbox test.ps plot that the axis labels appear to be drawn multiple times in slightly different fonts. (I see the same thing). Maybe another clue as to what's happening.
>
>>
>
>>
>
>>
>
>> thanks,
>
>>
>
>>
>
>>
>
>> John
>
>
>
> Hi John,
>
>
>
> So the original problem with the "bullet" character was fixed in IDL 8.3. That other problem with everything switching to greek is now fixed for IDL 8.3.1, due out hopefully sometime this summer.
>
>
>
> Cheers,
>
> Chris
>
> ExelisVIS
Chris,
Just noticed this behavior in my plots when using the hardware fonts, and will look forward to the 8.3.1 fix. In the mean time, is there code analogous to "!3" that I can use to fix my tick labels? My axis labels are fine, but the tick labels are in scientific notation and the "x" gets converted to an upper case Greek sigma (Linux IDL 8.2.2).
Thanks,
Derek
|
|
|
|
|
Re: multiple sign in postscript output in direct graphics [message #89416 is a reply to message #89415] |
Tue, 14 October 2014 09:14  |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Tuesday, October 14, 2014 6:21:04 AM UTC-6, jens...@gmail.com wrote:
> Hi all,
>
>
>
> I am having the same problem; that when plotting to a .ps using cgps_open, cgplot and cgps_close; the axis titles turn greek, and some axis labels seem to be drawn twice in different fonts.
>
>
>
> Am I correct in understanding that IDL 8.4 is due to be released in November?
>
>
Yes, very soon!
-Chris
|
|
|