Coder Social home page Coder Social logo

Comments (3)

beddalumia avatar beddalumia commented on July 24, 2024 1

Ok, this is embarrassing: I just had a local y variable somewhere in the middle, shadowing the module-wide parameter Y. Sorry for bothering you for such a naive error on my part and thanks for your time!

from pyplot-fortran.

jacobwilliams avatar jacobwilliams commented on July 24, 2024

I think you need to show me a full compilable version of the code that produces these errors. You've got something else wrong that I'm not seeing here. Maybe some uninitialized variables or something like that.

If I construct the following example based on the information I do have, I don't see these problems:

    program color_test

    use pyplot_module, only : pyplot, wp => pyplot_wp

    implicit none
    
    type(pyplot) :: plt   !! pytplot handler
    integer :: istat
    real(wp), parameter :: F(3) = [0.4510d0, 0.3098d0, 0.5882d0] ! Fortran-lang color 
    real(wp), parameter :: Y(3) = [0.9608d0, 0.8157d0, 0.0118d0] ! Yellow
 
    real(wp),dimension(3),parameter :: Ax = [1,2,3]
    real(wp),dimension(3),parameter :: Ay = [1,2,3]
    real(wp),dimension(3),parameter :: Bx = [1,2,3]
    real(wp),dimension(3),parameter :: By = [4,5,6]

    call plt%initialize(figsize=[20,10],title='color test')

    call plt%add_plot(Ax,Ay,label='',linestyle='o',markersize=5,color=F)
    call plt%add_plot(Bx,By,label='',linestyle='o',markersize=5,color=Y)

    call plt%savefig('color_test.png', pyfile='color_test.py',istat=istat)

    end program color_test

from pyplot-fortran.

beddalumia avatar beddalumia commented on July 24, 2024

You're right, your minimal test case works properly in my project too! There has to be something subtle indeed. I'll now proceed to carefully bend your program towards my actual use case until it breaks, and then we can discuss. Thanks for the prompt!

from pyplot-fortran.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.