Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Josef Heinen
    @jheinen
    With the low-level GR routines you can use/draw multiple X and/or Y axis. But you have to set the window/viewport information for each axis (pair).
    Sameer Deshmukh
    @v0dro
    @jheinen I can't find an easy way of setting the output image size in inches from the C API. Can you please point me in the right direction?
    Josef Heinen
    @jheinen
    You mean for a PNG image?
    Josef Heinen
    @jheinen
    currently, GR uses 600dpi, so setwsviewport(0, 6 * 0.0254, 0, 3 * 0.0254) would create a 6 by 3 inch @ 600dpi image
    Sameer Deshmukh
    @v0dro
    @jheinen I'm unable to modify the dimensions of the image even after using setwsviewport. It still outputs a PNG of 2400x2400 pixels. For example, if I use setwsviewport(0, 6 * 0.0254, 0, 3 * 0.0254).
    Josef Heinen
    @jheinen
    Could you please prove a MWE - just the C code
    Sameer Deshmukh
    @v0dro
    OK holdon
    a.v.mantzaris
    @mantzaris
    Hello! thinking about making an user interface and having GR in it
    was wondering: Does the Qt/QML inherit any of the restrictions in license from https://www.qt.io/terms-conditions/ qt.io?
    a.v.mantzaris
    @mantzaris
    Can GR be used as a display canvas within GTK?
    for GTK.jl
    Josef Heinen
    @jheinen
    a.v.mantzaris
    @mantzaris
    @jheinen , no, did not see that, thanks alot!
    a.v.mantzaris
    @mantzaris
    Any reason why the animation example
    p = plot([sin, cos], zeros(0), leg=false) anim = Animation() for x = range(0, stop=10π, length=100) push!(p, x, Float64[sin(x), cos(x)]) frame(anim) end
    would fail if convert and ffmpeg are installed?
    p = plot([sin, cos], zeros(0), leg=false) produces and displays an empty frame which then on the effort to start the animation, closes
    kojix2
    @kojix2
    Hello. Thank you as always.
    I'm creating GR bindings for Ruby.
    https://github.com/red-data-tools/GR.rb
    However, the contour curves are not the same.
    Why is this?
    image.png
    kojix2
    @kojix2
    Wow, there are a lot of Rubyists here... :open_mouth:
    kojix2
    @kojix2
    I like Julia too!
    kojix2
    @kojix2
    Maybe it's my mistake. I'll check it out.
    kojix2
    @kojix2
    My gridit usage was not good. I'll study harder. Thanks.
    kojix2
    @kojix2
    image.png
    I surfaceplot cancer genome data from cBioPortal. It may not make much sense academically, but it looks very beautiful.
    Thank you for your Great GR Framework!
    Josef Heinen
    @jheinen
    :smile:
    Petr Krysl
    @PetrKryslUCSD
    How do I set aspect ratio to give the same scaling along the three axes of a three-dimensional plot? Thanks.
    kojix2
    @kojix2
    How do I use the function named meta?
    I just tried GR.openmeta()
    and got an error.
    cannot connect to host localhost port 8002: 接続を拒否されました
    Ptr{Nothing} @0x0000000000000000
    "接続を拒否されました" means "Your connection has been denied."
    Josef Heinen
    @jheinen
    The meta feature is still WIP and the underlying API is subject to change. Please do not use the meta layer until it's finished (and documented)
    kojix2
    @kojix2
    Thnaks. I'm looking forward to it.
    kojix2
    @kojix2
    But what these meta functions will do? Could you tell me?
    Josef Heinen
    @jheinen
    It's described here (see slides 7, 8)
    kojix2
    @kojix2
    Thank you! I read the slide.
    kojix2
    @kojix2
    I see. Interactive visualization for browsers, especially for Jupyter notebooks!
    zaz1588
    @zaz1588
    hi, I ran the example from GR
    # Create example point data x = 8 .* rand(100) .- 4 y = 8 .* rand(100) .- 4 z = sin.(x) + cos.(y) using GR p=tricont(x, y, z)
    and I need the coordinates of the countourlines. Is it possible to get them?
    Josef Heinen
    @jheinen
    @zaz1588 Right now, the contour lines are calculated internally and can't be accessed from the (Julia) REPL.
    zaz1588
    @zaz1588
    ok. thanks
    Viktor Petukhov
    @VPetukhov

    Hi! I'm trying to plot a thin line and save it as a png, but looks like with png GR has restriction for minimal thickness.
    Code below produces the same result for any linewidth <= 1.0.

    GR.beginprint("test_gr.png")
    GR.setlinewidth(0.01)
    GR.polyline(x, y)
    GR.show()
    GR.endprint()

    Though the line is definitely thicker than 1 pixel. If I save it to svg, everything works well. Is there any way to fix this?
    I was trying to use Ghostscript plugin by adding ENV["GKS_USE_GS_PNG"] = 1, but it fails with "Ghostscript support not compiled in".

    Josef Heinen
    @jheinen
    Thanks for the hint. This is a bug in the GR Cairo plugin. I will fix it ASAP ...
    Josef Heinen
    @jheinen
    The problem ist fixed in GR#master - a MR is on the way ...
    Viktor Petukhov
    @VPetukhov
    Wow, it would save me a whole lot of time for transition to pyplot. Thank you for the fast reaction, @jheinen! However, I tried the latest master commit (jheinen/GR.jl@3c81a12), and the problem is still there. Not sure if it's the right one though, as it only adds setspace3d function.
    Josef Heinen
    @jheinen
    You will have to update the run-time: ENV["GRDIR"]=""; ] build GR
    Viktor Petukhov
    @VPetukhov
    Indeed, it works now perfectly. Thank you so much!
    ak202
    @ak202
    Hi, great work on this, but i'm just curious if there is any way to automatically resize output to fit the dimensions of the Qt window? This exists to at least some extent already, but it looks like the plot gets fit into a perfect square and then that square is what gets resized.
    Josef Heinen
    @jheinen
    GR keeps the aspect ratio. If you want to use the full Qt window, you will have to set both the workstation viewport and the workstation window (as in examples\qml_ex.jl)
    ak202
    @ak202
    I guess I was asking two questions without realizing it, sorry. One thing I was interested in is having the aspect ratio of the plot change automatically, and I'll look into your example if I have time to play around with that. Thanks!
    The second question is how to fill the window even when keeping the aspect ratio. This seems to work correctly if the plot is a perfect square i.e. size = (500, 500), but taller/wider rectangles will not fill the window even in a way that would preserve the aspect ratio. The more extreme the ratio, the smaller the plot is.
    ak202
    @ak202
    For example, if I have a landscape oriented window and have size = (500,500), it will fill vertically but not horizontally as one would expect, but then increasing the width variable will not increase the plot's width but instead decreases its height (also font size), which can create a lot of blank space
    Josef Heinen
    @jheinen
    I understand what you intend to do - it's possible with GR but I should probably find a more convenient way to chose it ...