help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scaling distance between xlabel/ylabel and axes


From: Tobias Schmid
Subject: Re: Scaling distance between xlabel/ylabel and axes
Date: Fri, 22 Oct 2010 11:25:16 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8

Am 22.10.2010 10:08, schrieb Ben Abbott:
On Oct 22, 2010, at 3:43 PM, Tobias Schmid wrote:

  
Am 22.10.2010 02:20, schrieb Ben Abbott:
    
On Oct 22, 2010, at 2:26 AM, Tobias Schmid wrote:

  
      
Am 21.10.2010 18:09, schrieb Ben Abbott:
    
        
On Oct 21, 2010, at 11:58 PM, Tobias Schmid wrote:

      
          
Am 21.10.2010 16:37, schrieb Ben Abbott:

        
            
On Oct 21, 2010, at 6:08 PM, Katzenman wrote:

          
              
Hello,

yes, that ist exactly what I'm looking for.
I just need to get a proper scaling for one plot.

An fontsize and type is not important, because I'm gonig to replace it,
using \psfrag in LaTex.
So for me it is just important to have a scaling, where there is no
overlapping of x/ylabel and x/yTicks.

And if it is possible to get a legende without overlapping labels, this
would be even better.
If that is not possible, I'll do it without using a legende and discribe the
curves in the caption of me figure in LaTeX.

Thanks for your help

Tobias

            
                
I had considered adding psfrag support to Octave. However, as psfrag is rather dated and no longer maintained we decided not to add that support.

However, if you are interested in that functionality, I've attached the function. This function works with the current developers sources. I haven't tried it with the 3.2.x series, but I expect it will work.

Please let me know if it works well for you. Criticism is welcome.

Ben

          
              
Hello Ben,

I tried to use your code, but I got the error messages added below.

psfrag(Abbildung ,"test" ,'fontsize', 18 ,'height','\\psfragheight' , 'wid
th' , '\\psfragwidth')
error: mat2cell: dimension can not be empty
error: called from:
error: /home/tobias/Diplomarbeit/Octave/psfrag.m at line 342, column 15
error: /home/tobias/Diplomarbeit/Octave/psfrag.m at line 236, column 17

Did I forget to hand over the parameter dimension? In the help enty no parameter called dimension in mentioned?

By the way, would this function solve my problem with the distances between the labels and the entries of the legende , which are not scalable.

Tobias

        
            
I'll take a look at this tomorrow. In the meantime, does you plot have ticklabels for each visible axes?

Ben


      
          
Yes, it does.
And as I told you, the tick labels and labels of the axes are overlapping, when enlarging the fontsize.
You do not need to spend that much time on it. It's just one last plot for my diploma thesis. And I didn't find a way to solve this problem on my own.

So, if you could explain to me, how to export the   debug.gp file and modify it in gnuplot to me, that would be great.
The psfrag thing already works fine with all my other plots.

I tried to modify the exported file, but if I'm honest, I couldn't even open it in gnu plot.

So thanks for your help once again.

Tobias
    
        
Let me know what output format you prefer and I can modify these instructions.

Create your plot and output to a file.

	plot (1:10)
	xlabel ("xlabel")
	ylabel ("ylabel")
	drawnow ("pdf", "test.pdf", false, "debug.gp");
	exit

Test the plotstream from the command line (DOS, BASH, other or shell).

	gnuplot debug.gp

That will create (re-create) the file test.pdf.  To be sure everything is working, view it with ghostscript ...

	gs test.pdf

You may need to replace "gs" with "gs.exe"

Edit debug.gp and look for "set terminal…" and edit that line to indicate the fontname and fantsize. Notice you can also change the plot size.

	set terminal pdf enhanced size 6,4 font "Helvetica,12"

Run gnuplot again …

	gnuplot debug.gp

The result should look more proper.

	gs test.pdf

If you like, email me the "debug.gp" file and I can look to see if there are other problems. Theres been several changes to the plotstream Octave sends to gnuplot, so I may have forgotten something important.

Ben
  
      
Hello,

I want to have a .eps -file.
I have attached the debug1.gp file, so if you want to have a look.
I also attached the m-file I use to create the plots.
Tobias
<debug1.gp><spektrum_plotten.m>
    
I've modified the gnuplot terminal to produce eps format (in color) and to use the Times-Roman font (18pt).  The plotstream and eps file are attached.

You can adjust the spacing of the axes text objects by changing the fontsize in the "set terminal ..." statement. If you wish to change the actual fontsize you'll need to do a search and replace.

Ben



  
Hello,

I guess my first problem is, that I don't know how to open the .gp file.
Can you tell me, how I open the .cp file.
Sorry, I never used gnuplot before.

Tobias

reply via email to

[Prev in Thread] Current Thread [Next in Thread]