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
    You can set the width/height using figsize (in inch). Unfortunately, you cannot change the internal DPI setting (which is 600) - I will add a DPI keyword argument in a future release - so for now, a 200x200 pixel output can be achieved using figsize=(200,200)./600
    Sameer Deshmukh
    @v0dro
    Thank you!
    Sameer Deshmukh
    @v0dro
    @jheinen how can I draw a circle using GR? Could not find anything in the C library.
    Josef Heinen
    @jheinen
    using GR; drawarc(0,1,0,1,0,360)
    Sameer Deshmukh
    @v0dro
    @jheinen Also, is there any way of setting the fill opacity?
    Ah
    Thanks!
    Josef Heinen
    @jheinen
    GR.setfillintstyle(GR.INTSTYLE_SOLID)
    Sameer Deshmukh
    @v0dro
    IN that example I can only see RGB values being set. Where is the opacity parameter?
    Josef Heinen
    @jheinen
    GR.settransparency(alpha)
    Sameer Deshmukh
    @v0dro
    @jheinen is it possible to explicitly set the X/Y co-ordinates on the axes and not rely solely on the parameters passed to gr_axes?
    Alish Dipani
    @alishdipani

    Hello,

    I am trying to install GR library for C on Ubuntu 18.04, I followed the steps mentioned on the website here. This did not work and gave the error :
    foo.c:1:10: fatal error: gr.h: No such file or directory

    include <gr.h>

          ^~~~~~

    compilation terminated.

    I also tried source install from git mentioned here but it gives the same error.

    I also tried using GR prebuilt binaries using this command : gcc -L/home/alu57202/Downloads/gr/lib -I/home/alu57202/Downloads/gr/include -lGR foo.c
    This command recognizes gr but then gives the following error :
    /tmp/cckVLH59.o: In function main': foo.c:(.text+0xc0): undefined reference togr_polyline'
    foo.c:(.text+0xd5): undefined reference to gr_tick' foo.c:(.text+0xef): undefined reference togr_tick'
    foo.c:(.text+0x11f): undefined reference to `gr_axes'
    collect2: error: ld returned 1 exit status

    Can anyone help me regarding this?

    Thank You.

    Josef Heinen
    @jheinen
    cc -I/usr/local/gr/include foo.c -L/usr/local/gr/lib -lGR -Wl,-rpath,/usr/local/gr/lib - probably a candidate for an alias or script
    ... or should be explained in the documentation

    @v0dro :

    @jheinen is it possible to explicitly set the X/Y co-ordinates on the axes and not rely solely on the parameters passed to gr_axes?

    It's on our TODO list ...

    Alish Dipani
    @alishdipani
    cc -I/usr/local/gr/include foo.c -L/usr/local/gr/lib -lGR -Wl,-rpath,/usr/local/gr/lib - probably a candidate for an alias or script
    This works perfectly. Thank You.
    Santiago Cuervo
    @scuervo91
    Hi, Is there a way to have multiple X axis in Gr?
    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?