[pstricks] pstricks plot in a floating figure is drawn above text

George pinkisntwell at gmail.com
Thu Jul 22 21:25:38 CEST 2010


2010/7/22 Herbert Voss <Herbert.Voss at fu-berlin.de>:
> Am 22.07.2010 20:50, schrieb George:
>> I tried to include a plot in my document using:
>>
>> %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> \begin {figure}[ht]
>> \begin {center}
>> %\includegraphics[width=\figurewidth]{dram_price.eps}
>> \psset{xunit=.5cm,yunit=4.5cm}
>>  \savedata{\mydata}[
>>  {{0, 0}, {1., 0.946083}, {2., 1.60541}, {3., 1.84865}, {4.,
>> .7582},
>>  {5., 1.54993}, {6., 1.42469}, {7., 1.4546}, {8., 1.57419},
>>  {9., 1.66504}, {10., 1.65835}, {11., 1.57831}, {12., 1.50497},
>>  {13., 1.49936}, {14., 1.55621}, {15., 1.61819}, {16., 1.6313},
>>  {17., 1.59014}, {18., 1.53661}, {19., 1.51863}, {20., 1.54824}}]
>>  \dataplot[plotstyle=curve,showpoints=true,
>>  dotstyle=triangle]{\mydata}
>>  \psline{<->}(0,2)(0,0)(20,0)
>> \end {center}
>> \caption {Prices of different capacity DRAM chips in 1977 dollars
>>                       \cite{patt_and_henn_quantitative}}
>> \label {dram_price}
>> \end {figure}
>> %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> But what I get is this:
>>
>> http://i31.tinypic.com/5dm5io.png
>>
>> Isn't it possible to have pstricks as a floating figure?
>
> sure! But you have to reserve some space for the image
> otherwise it is drawn overt he text.
>

Thanks! However, do I have to manually set the size of the space every
time? Also, I notice that the graphic is not centered correctly:

http://i26.tinypic.com/nqwml0.png

even though I have used the center environment. Can this be fixed?



More information about the PSTricks mailing list