Plotting (Greek letter label, high resolution...)

531 views
Skip to first unread message

digxx

unread,
Feb 1, 2016, 5:39:57 PM2/1/16
to julia-users
I have a few questions regarding plotting:
1. How do I plot Greek letters? In particular I want to use them as strings in a labeling of axes or curves.
2. When using Plot with backend Gadfly how do I savefig with higher resolution? So far it produces 600x400
3. How do I print x^* ?? (like it would look in latex)

digxx

unread,
Feb 1, 2016, 5:55:39 PM2/1/16
to julia-users
Sorry just found out about the second...
So still need 1 and 3 :-(

Tom Breloff

unread,
Feb 2, 2016, 9:21:26 AM2/2/16
to julia-users
I think this example will help:



The greek letters are created with tab completion: "\gamma<tab>"


For a little more info on latex in Gadfly, see this issue: https://github.com/dcjones/Gadfly.jl/issues/356

digxx

unread,
Feb 2, 2016, 5:35:51 PM2/2/16
to julia-users
Sorry to bother you again, but I still do have 2 issues:
using label="x<sup>x" for example works fine as long as I just plot in the browser, but when trying to use savefig it's telling me
(julia.exe:5956): Pango-WARNING **: pango_layout_set_markup_with_accel: Error on line 1 char 31: Element 'markup' was closed, but the currently open element is 'sup'

The second issue is that using label="x<sup>{\gamma<tab>}" is just printing x^{gamma} where gamma is actually written and not the sign!?

Tom Breloff

unread,
Feb 2, 2016, 6:24:22 PM2/2/16
to julia-users
Yes sorry you need the closing "</sup>" at the end.

<tab> means actually pressing the TAB key on your keyboard.

digxx

unread,
Feb 2, 2016, 7:26:25 PM2/2/16
to julia-users
Yes I tried for example
"\gamma            "
or
"{\gamma         }"
"{\gamma         }             "
and so on but i still get only the written gamma :-/
Maybe I'm missing some package?
Or some <> u need like with <sup>?

Stefan Karpinski

unread,
Feb 2, 2016, 9:22:44 PM2/2/16
to Julia Users
You need to press the tab key after typing \gamma.

digxx

unread,
Feb 3, 2016, 4:22:34 AM2/3/16
to julia-users
That it what I try to emphasize with the 3 examples (with blanks) above...
I did write \gamma and then this http://www.informationq.com/wp-content/uploads/2013/10/Tab-Key.jpg both in " ... " but it still doesnt work :-(
Working with cygwin on windows shouldnt be an issue or?

Tom Breloff

unread,
Feb 3, 2016, 8:58:53 AM2/3/16
to julia-users
You are doing this from the Julia REPL, or something else?  It should work inside the Julia REPL, if not maybe you should file an issue?  https://github.com/JuliaLang/julia/issues

digxx

unread,
Feb 3, 2016, 11:52:43 AM2/3/16
to julia-users
not quite sure what I belong to: I am using the REPL Julia interface only for include("....") to read/run my files i wrote in notepad. Does this still belong to REPL or what does it differ to IJulia for example (which I have never used yet)

digxx

unread,
Feb 3, 2016, 2:01:37 PM2/3/16
to julia-users
Ok now im home and see the problem. I never use repl for plotting. I just use notepad++ and run it.
\gamma turns into the actual letter when pressing tab, but not in the notepad obviously ;)
So is there a way to still do it?

digxx

unread,
Feb 3, 2016, 2:02:09 PM2/3/16
to julia-users
apart from using repl...

Stefan Karpinski

unread,
Feb 3, 2016, 2:08:13 PM2/3/16
to Julia Users
You can enter Unicode characters using Unicode escapes, e.g.

julia> "\u03b3"
"γ"

Windows has various ways of inputting Unicode characters like γ:


You may also want to try an editor that has support for this, e.g. Sublime Text.

On Wed, Feb 3, 2016 at 2:02 PM, digxx <diger...@hotmail.com> wrote:
apart from using repl...

Reply all
Reply to author
Forward
0 new messages