How to give diferent colors to diferent lines in matplotlib

materias = ["MAT 1","MAT 2","MAT 3","FIS 1","FIS 2","FIS 3","QUI 1","QUI 2","GEO 1","GEO 2","PORT","RED","LIT","ART","ING","HIST 1","HIST 2","FIL","SOC","EDF","BIO 1","BIO 2","BIO 3" ] for i in materias: note= str(i) file_name = ‘images/’ + str(i) +’.png’ print(i,":") plt.plot(df["PROVAS"], df[i], label=note) plt.legend() plt.savefig(file_name) plt.show() i dont know how to merge all of these graphs and dont know either how to give… Read More How to give diferent colors to diferent lines in matplotlib

tkinter radiobutton value no pass to label, remain at initial value

I try to display the current variable for the radio button but it seems remain at the initial value which is zero. my code was as below: single_magnet_plot_style=IntVar(value=0) Radio Button variable assignment: scatter_rbtn=Radiobutton(window, text="Scatter Plot", variable=single_magnet_plot_style,value=1) scatter_rbtn.place(relx=0.4,y=600) line_rbtn=Radiobutton(window, text="Line Plot", variable=single_magnet_plot_style,value=2) line_rbtn.place(relx=0.6, y=600) label display: new_label=Label(window, text=single_magnet_plot_style.get(), fg=’red’, font=("Helvetica", 13)) new_label.place(relx=0.5, y=550,anchor=CENTER) at my window,… Read More tkinter radiobutton value no pass to label, remain at initial value

Avoiding { in tkinter label coming from tuple

So I moved from printing my results to displaying them via a tkinter label. ttk.Label(root, text = (‘Erlaubte Fehlergrenze zwischen’, hin1,’ und ‘, hin2,’ = ‘,fehlergrenze,’ Wir haben: ‘, fehler)).pack() Now I have the problem that I get unwanted brackets {} seemingly coming from ”. Example for a current output: {Erlaubte Fehlergrenze zwischen} 0100042 {… Read More Avoiding { in tkinter label coming from tuple

Issue with scale_color_identity() in ggplot — labels reordered automatically by colour name

I want to control my font colour using explicitly named colours in the label_col column. However, it seems that the colours "black" and "white" end up being ordered alphabetically by the colour name, instead of following the same fill and position specified in ggplot(aes()) and geom_col(). Here is my minimal example with black and white:… Read More Issue with scale_color_identity() in ggplot — labels reordered automatically by colour name