1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Octave plot. Greek in legends

  1. Aug 19, 2009 #1
    1. The problem statement, all variables and given/known data

    Hi!

    I'm sorry if this is misplaced, but I didn't know where else to post it. In my thesis I need greek letters to appear in a legend for a figure generated with octave. Now I normally know how to do that. F.e. if I say:

    legend('\alpha','\kappa')

    everythging works brilliantly, but I need

    legend('\gamma','\kappa')

    and it keeps showing "\Symbol g" exept of a \gamma. I was hoping that someone might help, before this costs me another couple of hours.

    Thanks,
    Angelos


    2. Relevant equations



    3. The attempt at a solution
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
     
  2. jcsd
  3. Aug 19, 2009 #2

    kuruman

    User Avatar
    Homework Helper
    Gold Member

    I have never used octave for plotting, have you tried remapping your keyboard to display Greek characters? It is the obvious thing to try and allows you to intersperse ελληνικά καί αγγλικά (greek with english) with the click of a mouse (Mac) or HotKey (win). It works with most applications.
     
  4. Aug 20, 2009 #3
    Thank you!

    I'm not sure if I'm getting what you are suggesting, but I think your idea was to switch to a greek keyboard and simply type a gamma from there. In that case I would have a gamma in the text editor indeed, but not in the plot.
     
  5. Aug 20, 2009 #4

    tms

    User Avatar

    This is just a guess, but have you tried double-quoted strings?
     
  6. Aug 20, 2009 #5
    You mean "" instead of ''?
     
  7. Aug 20, 2009 #6

    tms

    User Avatar

    "foo" instead of 'foo'.
     
  8. Aug 20, 2009 #7
    Yes, it doesn't work. But thank you!
     
  9. Aug 20, 2009 #8

    tms

    User Avatar

    That seems contrary to the documentation, but maybe I am misunderstanding it.

    I tried
    legend('\gamma');
    and it gave me a [tex]\gamma[/tex]. Perhaps you need a newer version?
     
  10. Aug 20, 2009 #9
    Sounds good! My version says:
    GNU Octave, version 3.0.0
    Copyright (C) 2007 John W. Eaton and others.


    Do you have a newer one? My Ubuntu repository does not list a newer one, but if we not that that is the problem I might find a way around that
     
  11. Aug 20, 2009 #10

    tms

    User Avatar

    I have the Windows pre-built binary, version 3.0.5, configured for "i686-pc-mingw32". My FreeBSD and Solaris boxes are so old they won't compile it.
     
  12. Aug 20, 2009 #11
    Thanks a lot. It's probably the older version that causes the problem. I can't find a newer one in the repositories of my Ubuntu distribution, but I hope I can build it from source.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Octave plot. Greek in legends
  1. Sound with octaves (Replies: 1)

  2. Plot question (Replies: 19)

  3. Trajectory plotting. (Replies: 4)

Loading...