JuliaGraphics / Winston.jl

2D plotting for Julia
MIT License
171 stars 55 forks source link

Request for Example of changing title font size #275

Closed ezaron closed 7 years ago

ezaron commented 7 years ago

I'm not sure where the best place to ask for this type of example is, but I wonder how one would change the font size of the title. I have been trying to manipulate "title_style" as a Dict without success.

lobingera commented 7 years ago
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.0-pre.alpha.286 (2017-03-28 15:41 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 4809620* (0 days old master)
|__/                   |  x86_64-linux-gnu

julia> using Winston

julia> p = plot(rand(8,2))

julia> p.attr[:title_style][:fontsize] = 10.0
10.0

julia> title("abcDEF")

snapshot9

@ezaron; Like this?

ezaron commented 7 years ago

-- thanks a lot, Andreas. I had trouble understanding the structure of the p.attr. I think I understand now.

-Ed

On 3/28/17 10:56 AM, Andreas Lobinger wrote:

| () | A fresh approach to technical computing () | () () | Documentation: http://docs.julialang.org | |_ | Type "?help" for help. | | | | | | |/ ` | | | | || | | | (| | | Version 0.6.0-pre.alpha.286 (2017-03-28 15:41 UTC) / |_'|||_'_| | Commit 4809620* (0 days old master) |/ | x86_64-linux-gnu julia> using Winston julia> p = plot(rand(8,2)) julia> p.attr[:title_style][:fontsize] = 10.0 10.0 julia> title("abcDEF") |

snapshot9 https://cloud.githubusercontent.com/assets/5199059/24419770/9b6bcb0e-13f0-11e7-9f06-341ee0a89855.png

@ezaron https://github.com/ezaron; Like this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nolta/Winston.jl/issues/275#issuecomment-289852427, or mute the thread https://github.com/notifications/unsubscribe-auth/AEfCmB9UZzGHO5EURAMckijIpyb5Uv2xks5rqUnZgaJpZM4Ksurj.

--

Edward D. Zaron
Research Assistant Professor
Department of Civil and Environmental Engineering
Portland State University
Portland, OR 97207-0751
Phone: (503)-725-2435
FAX: (503)-725-5950
ezaron@pdx.edu