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

Home » Public Forums » archive » cgHistoplot and multiplot
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
cgHistoplot and multiplot [message #79820] Mon, 09 April 2012 11:48 Go to next message
DAVIDE LENA is currently offline  DAVIDE LENA
Messages: 22
Registered: September 2011
Junior Member
Hi everyone,
I am trying to use cgHistoplot with multiplot but I can't have it working properly.
My plotting code is

erase
multiplot,[2,1]
cgHistoplot, val1, /FREQUENCY, YTICKFORMAT='(F4.2)', DATACOLORNAME='Black', YTITLE=''
multiplot
cgHistoplot, val2, /FREQUENCY, YTICKFORMAT='(F4.2)', DATACOLORNAME='Black', YTITLE=''
multiplot,[1,1],/init,/verbose

Any hint?
Re: cgHistoplot and multiplot [message #80603 is a reply to message #79820] Thu, 28 June 2012 16:32 Go to previous messageGo to next message
DAVIDE LENA is currently offline  DAVIDE LENA
Messages: 22
Registered: September 2011
Junior Member
Wonderful! Thank you very much!

On Thursday, June 28, 2012 2:50:09 PM UTC-4, David Fanning wrote:
>
>> I had cgHistoplot working fine with multiplot for a while. At some point it stopped working...
>> I have the updated versions of multiplot and cgHistoplot.
>> What is happening is that all the histograms are drawn on the same reference frame and only one reference frame is represented. Though multiplot works perfectly well when I use just plot. I also tried to overplot the histogram but it does not work.
>> I am running something like that:
>>
>> SET_PLOT, 'x'
>> erase
>> multiplot,[1,3]
>> cgHistoplot, map1, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', /OUTLINE
>> multiplot
>> cgHistoplot, map2, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', YTITLE='', /OUTLINE
>> multiplot
>> cgHistoplot, map3, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', XTICKFORMAT='(F5.1)', YTITLE='', /OUTLINE
>> multiplot,[1,1],/init,/verbose
>>
>> Any suggestion?
>
> Whoops! My fault.
>
> I recently had reason to add a default positioning statement to
> cgHistoplot. I realized I couldn't do it if !P.Multi was being
> used, but since I don't use Multiplot myself, I didn't realize
> I also couldn't do it if the user is using !P.Position (which
> is how Multiplot works).
>
> Fixed now. You can find the latest version here:
>
> http://www.idlcoyote.com/programs/cghistoplot.pro
>
> Cheers,
>
> David
>
>
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: cgHistoplot and multiplot [message #80604 is a reply to message #79820] Thu, 28 June 2012 16:34 Go to previous messageGo to next message
DAVIDE LENA is currently offline  DAVIDE LENA
Messages: 22
Registered: September 2011
Junior Member
Thank you very much!
On Thursday, June 28, 2012 2:50:09 PM UTC-4, David Fanning wrote:
>> I had cgHistoplot working fine with multiplot for a while. At some point it stopped working...
>> I have the updated versions of multiplot and cgHistoplot.
>> What is happening is that all the histograms are drawn on the same reference frame and only one reference frame is represented. Though multiplot works perfectly well when I use just plot. I also tried to overplot the histogram but it does not work.
>> I am running something like that:
>>
>> SET_PLOT, 'x'
>> erase
>> multiplot,[1,3]
>> cgHistoplot, map1, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', /OUTLINE
>> multiplot
>> cgHistoplot, map2, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', YTITLE='', /OUTLINE
>> multiplot
>> cgHistoplot, map3, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', XTICKFORMAT='(F5.1)', YTITLE='', /OUTLINE
>> multiplot,[1,1],/init,/verbose
>>
>> Any suggestion?
>
> Whoops! My fault.
>
> I recently had reason to add a default positioning statement to
> cgHistoplot. I realized I couldn't do it if !P.Multi was being
> used, but since I don't use Multiplot myself, I didn't realize
> I also couldn't do it if the user is using !P.Position (which
> is how Multiplot works).
>
> Fixed now. You can find the latest version here:
>
> http://www.idlcoyote.com/programs/cghistoplot.pro
>
> Cheers,
>
> David
>
>
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: cgHistoplot and multiplot [message #80614 is a reply to message #79820] Thu, 28 June 2012 11:50 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
dxl1840@g.rit.edu writes:

> I had cgHistoplot working fine with multiplot for a while. At some point it stopped working...
> I have the updated versions of multiplot and cgHistoplot.
> What is happening is that all the histograms are drawn on the same reference frame and only one reference frame is represented. Though multiplot works perfectly well when I use just plot. I also tried to overplot the histogram but it does not work.
> I am running something like that:
>
> SET_PLOT, 'x'
> erase
> multiplot,[1,3]
> cgHistoplot, map1, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', /OUTLINE
> multiplot
> cgHistoplot, map2, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', YTITLE='', /OUTLINE
> multiplot
> cgHistoplot, map3, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', XTICKFORMAT='(F5.1)', YTITLE='', /OUTLINE
> multiplot,[1,1],/init,/verbose
>
> Any suggestion?

Whoops! My fault.

I recently had reason to add a default positioning statement to
cgHistoplot. I realized I couldn't do it if !P.Multi was being
used, but since I don't use Multiplot myself, I didn't realize
I also couldn't do it if the user is using !P.Position (which
is how Multiplot works).

Fixed now. You can find the latest version here:

http://www.idlcoyote.com/programs/cghistoplot.pro

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: cgHistoplot and multiplot [message #81717 is a reply to message #79820] Mon, 15 October 2012 09:07 Go to previous messageGo to next message
Phillip M. Bitzer is currently offline  Phillip M. Bitzer
Messages: 7
Registered: September 2012
Junior Member
When doing multiple plots in EPS "space," I find that I need to use the
NOERASE keyword. Not sure if that's the culprit here though...

On 10/15/12 10:32 AM, dxl1840@g.rit.edu wrote:
> I am trying to plot two histograms on a eps file using cgHistoplot and the few lines listed below.
> The plot comes out nicely on the X terminal, yet on the eps file it is just a mess...
> Anybody knows how to fix it?
> Thanks in advance.
>
>
> SET_PLOT, 'ps'
> erase
> multiplot,[2,1]
> DEVICE, /encapsulated, BITS_PER_PIXEL=8, FILENAME = patheps + strcompress('sigma.eps',/remove_all), /portrait, FONT_SIZE=15, /color, xsize=30, ysize= 20
>
> multiplot
> cgHistoplot, map1[w1], BINSIZE = 5., XRANGE = xr, YRANGE=yr, YTICKFORMAT='(F4.2)', YTITLE='', DataColor='green', /FREQUENCY, /OUTLINE
>
> multiplot
> cgHistoplot, map2[w2], BINSIZE = 5., XRANGE = xr, YRANGE=yr, YTICKFORMAT='(A1)', YTITLE='', DataColor='green', /FREQUENCY, /OUTLINE
>
> multiplot, [1,1], /init
>
>
Re: cgHistoplot and multiplot [message #81718 is a reply to message #79820] Mon, 15 October 2012 09:03 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
dxl1840@g.rit.edu writes:

>
> I am trying to plot two histograms on a eps file using cgHistoplot and the few lines listed below.
> The plot comes out nicely on the X terminal, yet on the eps file it is just a mess...
> Anybody knows how to fix it?
> Thanks in advance.
>
>
> SET_PLOT, 'ps'
> erase
> multiplot,[2,1]
> DEVICE, /encapsulated, BITS_PER_PIXEL=8, FILENAME = patheps + strcompress('sigma.eps',/remove_all), /portrait, FONT_SIZE=15, /color, xsize=30, ysize= 20
>
> multiplot
> cgHistoplot, map1[w1], BINSIZE = 5., XRANGE = xr, YRANGE=yr, YTICKFORMAT='(F4.2)', YTITLE='', DataColor='green', /FREQUENCY, /OUTLINE
>
> multiplot
> cgHistoplot, map2[w2], BINSIZE = 5., XRANGE = xr, YRANGE=yr, YTICKFORMAT='(A1)', YTITLE='', DataColor='green', /FREQUENCY, /OUTLINE
>
> multiplot, [1,1], /init

Actually, there is probably a lot more wrong than just the character size.
But, when I set the PostScript device up correctly, there doesn't seem
to be a problem. This works, for example:

PS_Start, Encapsulated=1, Filename='test.eps'
multiplot,[2,1], /init

multiplot
cgHistoplot, map1[w1], BINSIZE = 5., XRANGE = xr, YRANGE=yr, $
YTICKFORMAT='(F4.2)', YTITLE='', DataColor='green', /FREQUENCY, /OUTLINE

multiplot
cgHistoplot, map2[w2], BINSIZE = 5., XRANGE = xr, YRANGE=yr, $
YTICKFORMAT='(A1)', YTITLE='', DataColor='green', /FREQUENCY, /OUTLINE

multiplot, [1,1], /init
PS_End

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: cgHistoplot and multiplot [message #81719 is a reply to message #79820] Mon, 15 October 2012 08:55 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
dxl1840@g.rit.edu writes:

> I am trying to plot two histograms on a eps file using cgHistoplot and the few lines listed below.
> The plot comes out nicely on the X terminal, yet on the eps file it is just a mess...
> Anybody knows how to fix it?

Change FONT_SIZE=15 to something more reasonable. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: cgHistoplot and multiplot [message #81720 is a reply to message #80614] Mon, 15 October 2012 08:32 Go to previous messageGo to next message
DAVIDE LENA is currently offline  DAVIDE LENA
Messages: 22
Registered: September 2011
Junior Member
I am trying to plot two histograms on a eps file using cgHistoplot and the few lines listed below.
The plot comes out nicely on the X terminal, yet on the eps file it is just a mess...
Anybody knows how to fix it?
Thanks in advance.


SET_PLOT, 'ps'
erase
multiplot,[2,1]
DEVICE, /encapsulated, BITS_PER_PIXEL=8, FILENAME = patheps + strcompress('sigma.eps',/remove_all), /portrait, FONT_SIZE=15, /color, xsize=30, ysize= 20

multiplot
cgHistoplot, map1[w1], BINSIZE = 5., XRANGE = xr, YRANGE=yr, YTICKFORMAT='(F4.2)', YTITLE='', DataColor='green', /FREQUENCY, /OUTLINE

multiplot
cgHistoplot, map2[w2], BINSIZE = 5., XRANGE = xr, YRANGE=yr, YTICKFORMAT='(A1)', YTITLE='', DataColor='green', /FREQUENCY, /OUTLINE

multiplot, [1,1], /init


On Thursday, June 28, 2012 2:50:09 PM UTC-4, David Fanning wrote:
>
>
>
>> I had cgHistoplot working fine with multiplot for a while. At some point it stopped working...
>
>> I have the updated versions of multiplot and cgHistoplot.
>
>> What is happening is that all the histograms are drawn on the same reference frame and only one reference frame is represented. Though multiplot works perfectly well when I use just plot. I also tried to overplot the histogram but it does not work.
>
>> I am running something like that:
>
>>
>
>> SET_PLOT, 'x'
>
>> erase
>
>> multiplot,[1,3]
>
>> cgHistoplot, map1, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', /OUTLINE
>
>> multiplot
>
>> cgHistoplot, map2, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', YTITLE='', /OUTLINE
>
>> multiplot
>
>> cgHistoplot, map3, XRANGE=xr, /FREQUENCY, YTICKFORMAT='(F4.2)', XTICKFORMAT='(F5.1)', YTITLE='', /OUTLINE
>
>> multiplot,[1,1],/init,/verbose
>
>>
>
>> Any suggestion?
>
>
>
> Whoops! My fault.
>
>
>
> I recently had reason to add a default positioning statement to
>
> cgHistoplot. I realized I couldn't do it if !P.Multi was being
>
> used, but since I don't use Multiplot myself, I didn't realize
>
> I also couldn't do it if the user is using !P.Position (which
>
> is how Multiplot works).
>
>
>
> Fixed now. You can find the latest version here:
>
>
>
> http://www.idlcoyote.com/programs/cghistoplot.pro
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: cgHistoplot and multiplot [message #81752 is a reply to message #81718] Tue, 23 October 2012 09:40 Go to previous messageGo to next message
DAVIDE LENA is currently offline  DAVIDE LENA
Messages: 22
Registered: September 2011
Junior Member
Thanks both of you for your reply.
The code that David suggested work-ed.
Unfortunately I can't find a solution that is always working. In other words: the same code sometimes works, sometimes doesn't and I can't understand why. I reset or restart IDL, still it does not work. Sometimes the plot is fine after I try some different settings (e.g. before plotting my two panels side by side, I have to plot 4 panels with multiplot,[2,2] and then go back).
Though plots are always perfects on the x terminal.
This so time consuming and frustrating!
Now I am trying to have two plots, side by side, 1 row, two columns. On the eps file IDL plots the first one taking all the space and then it overplots the second one on half of the space on the left.
Yet it seems that there are no problems when I plot the graphs in 1 col 2 rows.
I start wandering if the problem is the version of IDL (7.1.1)...

This is what I am using:

PS_Start, Encapsulated=1, FILENAME = 'test.eps', CHARSIZE=1, Font = -1, xsize=8, ysize= (8*4.5/5)

multiplot,[2,1], /init
plot, map1[wb], map2[wb], YRANGE=yr, PSYM = 2, XTITLE= greekLetter + '[km/s]', YTICKFORMAT='(F4.2)'

multiplot
plot, map3[wn], map4[wn], YRANGE=yr, PSYM = 2, XTITLE= greekLetter + '[km/s]', YTICKFORMAT='(A1)', YTITLE = ''
multiplot, [1,1], /init
PS_End

Thanks in advance for your help.
Sorry to be so annoying about this subject.


On Monday, October 15, 2012 12:03:50 PM UTC-4, David Fanning wrote:

>
>
>
>>
>
>> I am trying to plot two histograms on a eps file using cgHistoplot and the few lines listed below.
>
>> The plot comes out nicely on the X terminal, yet on the eps file it is just a mess...
>
>> Anybody knows how to fix it?
>
>> Thanks in advance.
>
>>
>
>>
>
>> SET_PLOT, 'ps'
>
>> erase
>
>> multiplot,[2,1]
>
>> DEVICE, /encapsulated, BITS_PER_PIXEL=8, FILENAME = patheps + strcompress('sigma.eps',/remove_all), /portrait, FONT_SIZE=15, /color, xsize=30, ysize= 20
>
>>
>
>> multiplot
>
>> cgHistoplot, map1[w1], BINSIZE = 5., XRANGE = xr, YRANGE=yr, YTICKFORMAT='(F4.2)', YTITLE='', DataColor='green', /FREQUENCY, /OUTLINE
>
>>
>
>> multiplot
>
>> cgHistoplot, map2[w2], BINSIZE = 5., XRANGE = xr, YRANGE=yr, YTICKFORMAT='(A1)', YTITLE='', DataColor='green', /FREQUENCY, /OUTLINE
>
>>
>
>> multiplot, [1,1], /init
>
>
>
> Actually, there is probably a lot more wrong than just the character size.
>
> But, when I set the PostScript device up correctly, there doesn't seem
>
> to be a problem. This works, for example:
>
>
>
> PS_Start, Encapsulated=1, Filename='test.eps'
>
> multiplot,[2,1], /init
>
>
>
> multiplot
>
> cgHistoplot, map1[w1], BINSIZE = 5., XRANGE = xr, YRANGE=yr, $
>
> YTICKFORMAT='(F4.2)', YTITLE='', DataColor='green', /FREQUENCY, /OUTLINE
>
>
>
> multiplot
>
> cgHistoplot, map2[w2], BINSIZE = 5., XRANGE = xr, YRANGE=yr, $
>
> YTICKFORMAT='(A1)', YTITLE='', DataColor='green', /FREQUENCY, /OUTLINE
>
>
>
> multiplot, [1,1], /init
>
> PS_End
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>
> Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: cgHistoplot and multiplot [message #81845 is a reply to message #79820] Tue, 23 October 2012 13:17 Go to previous message
DAVIDE LENA is currently offline  DAVIDE LENA
Messages: 22
Registered: September 2011
Junior Member
It works! It seems that the additional - and reasonable - "multiplot" solved the problem.
Thanks very much!

On Tuesday, October 23, 2012 3:33:09 PM UTC-4, David Fanning wrote:
> Davide writes:
>
>
>
>> Sorry to say that it didn't make any change.
>
>> BTW, these problems are particularly true with cgHistoplot (when I make other plots I solve the problem - somehow). Anywya, in the real of eps, I feel that I don't really have control on what I plot with IDL.
>
>>
>
>> PS_Start, Encapsulated=1, FILENAME = 'Histog_OI_Ha.eps', CHARSIZE=1, Font = -1
>
>> multiplot,[2,1], /init
>
>> cgHistoplot, map1[wn], BINSIZE=bs, /FREQUENCY, YRANGE= yr, YTICKFORMAT='(F4.2)', DataColor='black', /OUTLINE
>
>> XYOUTS, .3, .8, 'Narrow', /NORMAL, CHARSIZE=2
>
>> multiplot
>
>> cgHistoplot, map2[wb], BINSIZE=bs, /FREQUENCY, YRANGE= yr, YTICKFORMAT='(A1)', YTITLE='', DataColor='black', /OUTLINE
>
>> XYOUTS, .8, .8, 'Broad', /NORMAL, CHARSIZE=2
>
>> PS_End
>
>> !P.MULTI=0
>
>
>
> OK, after reading how MULTIPLOT works, let's try this:
>
>
>
> PS_Start, Encapsulated=1, FILENAME = 'Histog_OI_Ha.eps', CHARSIZE=1, Font = -1
>
> multiplot,[2,1], /init
>
> multiplot
>
> cgHistoplot, map1[wn], BINSIZE=bs, /FREQUENCY, YRANGE= yr, $
>
> YTICKFORMAT='(F4.2)', DataColor='black', /OUTLINE
>
> XYOUTS, .3, .8, 'Narrow', /NORMAL, CHARSIZE=2
>
> multiplot
>
> cgHistoplot, map2[wb], BINSIZE=bs, /FREQUENCY, YRANGE= yr, $
>
> YTICKFORMAT='(A1)', YTITLE='', DataColor='black', /OUTLINE
>
> XYOUTS, .8, .8, 'Broad', /NORMAL, CHARSIZE=2
>
> PS_End
>
> !P.MULTI=0
>
>
>
> Let me know. This works for me. If it *still* doesn't work, be
>
> sure you are running the *latest* cgHistoplot:
>
>
>
> http://www.idlcoyote.com/programs/cghistoplot.pro
>
>
>
> Cheers,
>
>
>
> David
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>
> Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: cgHistoplot and multiplot [message #81847 is a reply to message #79820] Tue, 23 October 2012 12:33 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Davide writes:

> Sorry to say that it didn't make any change.
> BTW, these problems are particularly true with cgHistoplot (when I make other plots I solve the problem - somehow). Anywya, in the real of eps, I feel that I don't really have control on what I plot with IDL.
>
> PS_Start, Encapsulated=1, FILENAME = 'Histog_OI_Ha.eps', CHARSIZE=1, Font = -1
> multiplot,[2,1], /init
> cgHistoplot, map1[wn], BINSIZE=bs, /FREQUENCY, YRANGE= yr, YTICKFORMAT='(F4.2)', DataColor='black', /OUTLINE
> XYOUTS, .3, .8, 'Narrow', /NORMAL, CHARSIZE=2
> multiplot
> cgHistoplot, map2[wb], BINSIZE=bs, /FREQUENCY, YRANGE= yr, YTICKFORMAT='(A1)', YTITLE='', DataColor='black', /OUTLINE
> XYOUTS, .8, .8, 'Broad', /NORMAL, CHARSIZE=2
> PS_End
> !P.MULTI=0

OK, after reading how MULTIPLOT works, let's try this:

PS_Start, Encapsulated=1, FILENAME = 'Histog_OI_Ha.eps', CHARSIZE=1, Font = -1
multiplot,[2,1], /init
multiplot
cgHistoplot, map1[wn], BINSIZE=bs, /FREQUENCY, YRANGE= yr, $
YTICKFORMAT='(F4.2)', DataColor='black', /OUTLINE
XYOUTS, .3, .8, 'Narrow', /NORMAL, CHARSIZE=2
multiplot
cgHistoplot, map2[wb], BINSIZE=bs, /FREQUENCY, YRANGE= yr, $
YTICKFORMAT='(A1)', YTITLE='', DataColor='black', /OUTLINE
XYOUTS, .8, .8, 'Broad', /NORMAL, CHARSIZE=2
PS_End
!P.MULTI=0

Let me know. This works for me. If it *still* doesn't work, be
sure you are running the *latest* cgHistoplot:

http://www.idlcoyote.com/programs/cghistoplot.pro

Cheers,

David
David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: cgHistoplot and multiplot [message #81848 is a reply to message #79820] Tue, 23 October 2012 12:17 Go to previous message
DAVIDE LENA is currently offline  DAVIDE LENA
Messages: 22
Registered: September 2011
Junior Member
Sorry to say that it didn't make any change.
BTW, these problems are particularly true with cgHistoplot (when I make other plots I solve the problem - somehow). Anywya, in the real of eps, I feel that I don't really have control on what I plot with IDL.

PS_Start, Encapsulated=1, FILENAME = 'Histog_OI_Ha.eps', CHARSIZE=1, Font = -1
multiplot,[2,1], /init
cgHistoplot, map1[wn], BINSIZE=bs, /FREQUENCY, YRANGE= yr, YTICKFORMAT='(F4.2)', DataColor='black', /OUTLINE
XYOUTS, .3, .8, 'Narrow', /NORMAL, CHARSIZE=2
multiplot
cgHistoplot, map2[wb], BINSIZE=bs, /FREQUENCY, YRANGE= yr, YTICKFORMAT='(A1)', YTITLE='', DataColor='black', /OUTLINE
XYOUTS, .8, .8, 'Broad', /NORMAL, CHARSIZE=2
PS_End
!P.MULTI=0


On Tuesday, October 23, 2012 1:34:48 PM UTC-4, David Fanning wrote:
> Davide writes:
>
>
>
>> The code that David suggested work-ed.
>
>> Unfortunately I can't find a solution that is always working. In other words: the same code sometimes works, sometimes doesn't and I can't understand why. I reset or restart IDL, still it does not work. Sometimes the plot is fine after I try some different settings (e.g. before plotting my two panels side by side, I have to plot 4 panels with multiplot,[2,2] and then go back).
>
>> Though plots are always perfects on the x terminal.
>
>> This so time consuming and frustrating!
>
>> Now I am trying to have two plots, side by side, 1 row, two columns. On the eps file IDL plots the first one taking all the space and then it overplots the second one on half of the space on the left.
>
>> Yet it seems that there are no problems when I plot the graphs in 1 col 2 rows.
>
>> I start wandering if the problem is the version of IDL (7.1.1)...
>
>>
>
>> This is what I am using:
>
>>
>
>> PS_Start, Encapsulated=1, FILENAME = 'test.eps', CHARSIZE=1, Font = -1, xsize=8, ysize= (8*4.5/5)
>
>>
>
>> multiplot,[2,1], /init
>
>> plot, map1[wb], map2[wb], YRANGE=yr, PSYM = 2, XTITLE= greekLetter + '[km/s]', YTICKFORMAT='(F4.2)'
>
>>
>
>> multiplot
>
>> plot, map3[wn], map4[wn], YRANGE=yr, PSYM = 2, XTITLE= greekLetter + '[km/s]', YTICKFORMAT='(A1)', YTITLE = ''
>
>> multiplot, [1,1], /init
>
>> PS_End
>
>>
>
>> Thanks in advance for your help.
>
>> Sorry to be so annoying about this subject.
>
>
>
> This is a classic case of getting !P.MULTI all screwed up.
>
> Take out that last MULTIPLOT command before the PS_END
>
> and add an !P.MULTI=0 *after* PS_END. That will probably
>
> help a LOT. :-)
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>
> Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: cgHistoplot and multiplot [message #81850 is a reply to message #81752] Tue, 23 October 2012 10:34 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Davide writes:

> The code that David suggested work-ed.
> Unfortunately I can't find a solution that is always working. In other words: the same code sometimes works, sometimes doesn't and I can't understand why. I reset or restart IDL, still it does not work. Sometimes the plot is fine after I try some different settings (e.g. before plotting my two panels side by side, I have to plot 4 panels with multiplot,[2,2] and then go back).
> Though plots are always perfects on the x terminal.
> This so time consuming and frustrating!
> Now I am trying to have two plots, side by side, 1 row, two columns. On the eps file IDL plots the first one taking all the space and then it overplots the second one on half of the space on the left.
> Yet it seems that there are no problems when I plot the graphs in 1 col 2 rows.
> I start wandering if the problem is the version of IDL (7.1.1)...
>
> This is what I am using:
>
> PS_Start, Encapsulated=1, FILENAME = 'test.eps', CHARSIZE=1, Font = -1, xsize=8, ysize= (8*4.5/5)
>
> multiplot,[2,1], /init
> plot, map1[wb], map2[wb], YRANGE=yr, PSYM = 2, XTITLE= greekLetter + '[km/s]', YTICKFORMAT='(F4.2)'
>
> multiplot
> plot, map3[wn], map4[wn], YRANGE=yr, PSYM = 2, XTITLE= greekLetter + '[km/s]', YTICKFORMAT='(A1)', YTITLE = ''
> multiplot, [1,1], /init
> PS_End
>
> Thanks in advance for your help.
> Sorry to be so annoying about this subject.

This is a classic case of getting !P.MULTI all screwed up.
Take out that last MULTIPLOT command before the PS_END
and add an !P.MULTI=0 *after* PS_END. That will probably
help a LOT. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Simple question in IDL, looking for solution, thank you
Next Topic: Simple question in IDL, looking for solution, thank you

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

Current Time: Wed Oct 08 13:49:47 PDT 2025

Total time taken to generate the page: 0.00520 seconds