Making transparent axis

Hi - I’m using ROOT 4.00/08. I’m following the example here:

root.cern.ch/root/html/examples/twoscales.C.html

The problem is that when I create an EPS file (which looks fine), and then include it as a scaled figure in my latex file, the scaling seems to screw up the right hand axis so that the black and red tick marks are slightly offset.

An example is here:

www.slac.stanford.edu/~edward/mytest.ps

The best solution seems to be to make the black right-hand axis transparent (but not the left-hand axis), so that only the red axis shows on the right side.

Is there any easy, automatic way to get that right black axis within my code so that I can change its color (meaning without having to select it in the editor)?

Thanks.

-Ed

So, before including your EPS file into Latex it’s looking fine ? right ?
In that case I think it is better to understand why Latex in doing a such bad thing on your file. How do you include the EPS file into your latex document ? The following Latex file gives the attached PS file. As you can see the image is not damaged.

\documentclass{article}
\usepackage{graphicx}
\pagestyle{empty}
\begin{document}
\begin{center}
\includegraphics[scale=0.5]{c1.eps}
\end{center}
Figure generated with twoscales.C
\end{document}

latex.ps (22.2 KB)

Hi - (yes - the EPS file looks fine). This is how I include it:

\begin{figure}[]
     \centering

     \subfigure[Two-photon parameter FOM and marginal efficiency, learning sample.]{
          \label{fig:two_phot_learn_eff_FOM}
         \includegraphics[width=0.75\textwidth]{figures/twophot_eff_FOM_learn.eps}}

     \subfigure[Two-photon parameter FOM and marginal efficiency, testing sample.]{
          \label{fig:two_phot_test_eff_FOM}
          \includegraphics[width=0.75\textwidth]{figures/twophot_eff_FOM_test.eps}}

     \vspace{-.5cm}
     \caption{Electron mode optimization results for two-photon parameter for both
learning and testing samples.  The FOM used above is the penalized FOM desribed in Equation~\ref{equation:penalized_FOM}.}
     \label{fig:two_phot_FOM}
\end{figure}

I’m not sure why this happens - but it seems like the simplest workaround would be to make the black axis transparent on the right hand side. Is this difficult to do? Thanks.

what about if you include it the same way as I did ? using “scale” ?

Same result.

Can you send me the PS file you have problems with ?

Actually - this is weird. I’m viewing the EPS file in GSView and it now looks screwed up. I’m not sure why it looked OK earlier.

slac.stanford.edu/~edward/ed.eps

Looks weird with gv too. So your PS file is wrong. Nothing to do with latex. Can you send me the macro you used to generate that file ?

Hi - it’s available at:

www.hep.caltech.edu/~edward/edtemp.tar

BTW - I have another EPS problem, but I’ll start another thread for that.

There is a problem with this web site. Iget:

The Page or File you are trying to access no longer exists on our website.

If you believe this error is due to a broken link or problem we should be aware of, please e-mail us at wwwmgr@hep.caltech.edu.

Have a nice day.

Regards,
Web Admin @
High Energy Physics

Sorry - there were issues with the file server. It’s there now, along with the file from the thread.

I had to modify your macro:

  • I do not have babar style
  • I do no have the subdirectory “ps”
    please, before sending an example check it can be executed without any changes.

Anyway when I executed the macro and I did not get the miss-aligned tick marks in the PS file.But the output on screen is really weird !!! are you sure you started from the example in $ROOTSYS/tutorials ? Can you produce something really simple I can execute ? now my version is different from yours, so again we do not speak about the same thing. Note that when one tries to get the minimal example showing a problem he often find the cause of the problem !
twophot_eff_FOM_test_temp.ps (9.42 KB)