Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update graphdemo.jl #279

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

StevenSiew
Copy link

  1. Update formatting of module luxorgraphtools by indenting module source code

  2. add minorticks feature to function lit_create_graph_xticks and function lit_create_graph_yticks

  3. add more arrow functions
    lit_graph_arrow_text_cart_W
    lit_graph_arrow_text_cart_NW
    lit_graph_arrow_text_cart_SW

  4. add more arrows to the graph

    """ Draw Arrow for (cos(π x) - sin(2x)) exp(-0.2x) """
    xvalue = 3.6
    xcoor = lit_convert_graph_xvalue_to_cart_xcoor(canvasconfig,xvalue,xlims,myplottingarea)
    yvalue = -1 * (sin(2 * xvalue) + cos(pi * xvalue)) * exp(-0.2 * xvalue)
    ycoor = lit_convert_graph_yvalue_to_cart_ycoor(canvasconfig,yvalue,ylims,myplottingarea)
    lit_graph_arrow_text_cart_W("(cos(π x) - sin(2x)) exp(-0.2x)",xcoor,ycoor)

    """ Draw Arrow for cos(x) """
    xvalue = 4.9
    xcoor = lit_convert_graph_xvalue_to_cart_xcoor(canvasconfig,xvalue,xlims,myplottingarea)
    yvalue = cos(xvalue)
    ycoor = lit_convert_graph_yvalue_to_cart_ycoor(canvasconfig,yvalue,ylims,myplottingarea)
    lit_graph_arrow_text_cart_NW("cos(x)",xcoor,ycoor,arrow_length=40)

    """ Draw Arrow for sin(x) """
    xvalue = 3.1
    xcoor = lit_convert_graph_xvalue_to_cart_xcoor(canvasconfig,xvalue,xlims,myplottingarea)
    yvalue = sin(xvalue)
    ycoor = lit_convert_graph_yvalue_to_cart_ycoor(canvasconfig,yvalue,ylims,myplottingarea)
    lit_graph_arrow_text_cart_SW("sin(x)",xcoor,ycoor,arrow_length=40,horizontal_length=20)

  5. update calling xticks and yticks to set minorticks flag to true

     lit_create_graph_xticks(0:1:6,xlims,myplottingarea,minortick=true)
     lit_create_graph_yticks(-1.2:0.2:1.2,ylims,myplottingarea,minortick=true)
    

Update formatting of module 
add minortick to xticks and yticks
add more arrow functions
@codecov
Copy link

codecov bot commented Oct 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.45%. Comparing base (65e5e87) to head (16ff49a).
Report is 69 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #279   +/-   ##
=======================================
  Coverage   74.45%   74.45%           
=======================================
  Files          35       35           
  Lines        6701     6701           
=======================================
  Hits         4989     4989           
  Misses       1712     1712           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hyrodium
Copy link
Contributor

  1. Update formatting of module luxorgraphtools by indenting module source code

Note that most Julia script does not indent the body of the module.

The recommended style is not to indent the body of the module, since that would typically lead to whole files being indented.

https://docs.julialang.org/en/v1/manual/modules/

@cormullion
Copy link
Member

In theory, if you change the code so that the output looks different, you should probably also update the output file (in docs/src/assets/figures/, because it's not run automatically. But I don't think it's strictly necessary in this case before the PR can be merged.

@StevenSiew
Copy link
Author

Sorry. Originally the module itself is in another file but I rather have only one file instead of two separate files. On it's own file, I have always indented the contents of the module so I guess that I have mess up.

Also, please run the file and update the SVG file in in docs/src/assets/figures/
This will also check that the source file is correct and does generate the NEW diagram of the plot.

Copy link

stale bot commented Mar 13, 2024

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants