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

Added a color menu in graph and list #1741

Open
wants to merge 9,526 commits into
base: master
Choose a base branch
from
Open

Conversation

RedGl0w
Copy link
Contributor

@RedGl0w RedGl0w commented Dec 29, 2020

Rebase of #1385 on master, and with a todo list which will be certainly done :

  • Change color name in i18n to avoid depending of python, and the color suffix

Screenshot :
image
image

EmilieNumworks and others added 30 commits June 4, 2020 14:50
Added a condition for being considered empty.
Allows axis("on") or axis((0,1,2,3)) to display something with show()
This behavior is the same as the python module

Change-Id: If5f3b07c280ee9ead2bc23d23cbbb4f01da7eae5
Change-Id: Idea0ce07cbc800139539f9d3fb27811920645184
Allows user to print strings with the turtle

Change-Id: I06a3832f6fa36d29506be10c48a1b2fb34cb69fb
Change-Id: I3ff3d4fb3552bcb8c375c77651db3b7c44991646
Change-Id: I29476d8148ad98285505adc460b90628573518fa
Scenario: write a ascrip "from matplotlib.pyplot0 import *" than open
the variable box
Scenario: add the script
from matplotlib.pyplot import *\nfrom math import *\n\ng=9.81\n\ndef x(t,v_0,alpha):\n  return v_0*cos(alpha)*t\ndef y(t,v_0,alpha,h_0):\n  return -0.5*g*t**2+v_0*sin(alpha)*t+h_0\n\ndef vx(v_0,alpha):\n  return v_0*cos(alpha)\ndef vy(t,v_0,alpha):\n  return -g*t+v_0*sin(alpha)\n\ndef t_max(v_0,alpha,h_0):\n  return (v_0*sin(alpha)+sqrt((v_0**2)*(sin(alpha)**2)+2*g*h_0))/g\n\ndef simulation(v_0=15,alpha=pi/4,h_0=2):\n  tMax=t_max(v_0,alpha,h_0)\n  accuracy=1/10**(floor(log10(tMax))-1)\n  T_MAX=floor(tMax*accuracy)+1\n  X=[x(t/accuracy,v_0,alpha) for t in range(T_MAX)]\n  Y=[y(t/accuracy,v_0,alpha,h_0) for t in range(T_MAX)]\n  VX=[vx(v_0,alpha) for t in range(T_MAX)]\n  VY=[vy(t/accuracy,v_0,alpha) for t in range(T_MAX)]\n  for i in range(T_MAX):\n    arrow(X[i],Y[i],VX[i]/accuracy,VY[i]/accuracy)\n  grid()\n  show()tan(if :\n    \n  celse:\n  )c
then autocomplete after the last c.
expression contains a unit but we can't extract it (2^_min for instance)
No scenario, but it seems right to reset m_shortenResultCharCount
Example script:
from turtle import *
hideturtle()

We had "hideturtle" in the local variables, and "hideturtle()" in the
imported. Now we should only have the latter.
To prevent crashes caused by failed casts from char to float, removed optimization.

Change-Id: Ia91aafa007538b6c05f7aace5e5962989d313c98
checkFloatType function used to check for an obj type before cast. This is already done by mp_obj_get_float

Change-Id: I745bb3066328678ab0b2a2149c8f38a84f26fbd2
denominator() at reduction - there is no reason that there is no unit at
this stage...)
containing matrix of complex form (for instance ConfidenceInterval).

This fixes the following bug: input (2_m*confidence(0.2,12))^(-1) -->
crashes
@RedGl0w RedGl0w marked this pull request as draft December 30, 2020 07:57
@RedGl0w RedGl0w marked this pull request as ready for review December 30, 2020 18:38

constexpr const I18n::Message MessageTableCellWithColor::k_textForIndex[Palette::numberOfDataColors()];

constexpr const uint8_t colorMask[MessageTableCellWithColor::ColorView::k_colorSize][MessageTableCellWithColor::ColorView::k_colorSize] = { // FIXME Can't link with constexpr static
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the // FIXME

@nsi-xyz
Copy link

nsi-xyz commented Apr 11, 2021

J'aimerais bien que mes élèves puissent choisir les couleurs de leurs fonctions !
Si l'on pouvait aussi colorier une portion de l'écran avec f(x) > 2x+3 cela serait sympa aussi pour résoudre certains problèmes, mais le temps de développement serait important j'imagine.

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

10 participants