Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: How to customize x axis in matplotlib.pyplot for a scatter plot?
Post: RE: How to customize x axis in matplotlib.pyplot f...
Figured it out...
I just divided every value by 365 |
|
wlsa |
Homework |
9 |
8,225 |
Nov-10-2018, 01:32 AM |
|
|
Thread: How to customize x axis in matplotlib.pyplot for a scatter plot?
Post: RE: How to customize x axis in matplotlib.pyplot f...
It's just a list of floats
x=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
temp_list=[52.2, 38.5, 42.0, 41.2, 37.2, 52.1, 51.8, 51.0, 62.4, 68.7, 72.4, 71.6, 60.5, 53.3, 51.3, 56... |
|
wlsa |
Homework |
9 |
8,225 |
Nov-09-2018, 07:47 PM |
|
|
Thread: How to customize x axis in matplotlib.pyplot for a scatter plot?
Post: RE: How to customize x axis in matplotlib.pyplot f...
Maybe I wasn't clear enough.
[Image: https://imgur.com/a/WBAWg9G]
I want the plot to look exactly the same, just 0 to read 1996, 2000 to read 2001, 4000 to read 2006, 6000 to read 2011, and 8000 to r... |
|
wlsa |
Homework |
9 |
8,225 |
Nov-09-2018, 07:31 PM |
|
|
Thread: How to customize x axis in matplotlib.pyplot for a scatter plot?
Post: RE: How to customize x axis in matplotlib.pyplot f...
I only have 3 lists.
One is temp_list, which contains 8698 temperatures.
The second one is date_list, which 8698 dates in the format of m/d/y.
The last one is simply 'x', and it contains the number 1 ... |
|
wlsa |
Homework |
9 |
8,225 |
Nov-09-2018, 05:04 PM |
|
|
Thread: How to customize x axis in matplotlib.pyplot for a scatter plot?
Post: How to customize x axis in matplotlib.pyplot for a...
I have a list of 8698 temperatures which I want to plot on a scatter plot. How do I set the x-axis ticks labeled to a list of years? The list of years I have isn't as long as the temperature list, so ... |
|
wlsa |
Homework |
9 |
8,225 |
Nov-09-2018, 04:25 AM |
|
|
Thread: How to create custom error bars in matplotlib.pyplot?
Post: RE: How to create custom error bars in matplotlib....
figured it out.
I made two new lists, the upper limit list was the high minus the average, and the other lower list was the average minus the low.
asymmetric_error_bars=[lower_limit_list, upper_limit_... |
|
wlsa |
Homework |
1 |
4,261 |
Nov-04-2018, 09:49 PM |
|
|
Thread: How to create custom error bars in matplotlib.pyplot?
Post: How to create custom error bars in matplotlib.pypl...
I have created a list of average monthly temperatures and the high and low temperatures for each month. I am being asked to create a bar graph for each month's average temperature, and then add error ... |
|
wlsa |
Homework |
1 |
4,261 |
Nov-04-2018, 06:22 PM |
|
|
Thread: How to force print statement to print on one line
Post: RE: How to force print statement to print on one l...
Oh wow, I gave the variables a \n in the other file...
I have no idea how you figured that out with the information I gave you wow. |
|
wlsa |
Homework |
4 |
3,548 |
Oct-28-2018, 08:24 PM |
|
|
Thread: How to force print statement to print on one line
Post: How to force print statement to print on one line
I have a print statement (inside a larger program and loop)
print("at", independent_variable, '=', x_interpolation_number[0], dependent_variable, '=', t_interpolation_number[0])and for some reason the... |
|
wlsa |
Homework |
4 |
3,548 |
Oct-28-2018, 05:16 PM |
|
|
Thread: Can't find a library for this
Post: Can't find a library for this
I needed code that converted a string into a list of floats, where the string is in the format or '1, 2, .5, 6, 1.23, 10' etc and then the list would be [1, 2, .5, 6, 1.23, 10]
The code I made works b... |
|
wlsa |
Homework |
2 |
2,188 |
Oct-26-2018, 10:10 PM |
|
|
Thread: How to test if an input is any number?
Post: RE: How to test if an input is any number?
Oh...
I had a different error in my code that prevented the is_number from being utilized properly, sorry. |
|
wlsa |
Homework |
2 |
2,339 |
Oct-03-2018, 04:43 PM |
|
|
Thread: How to test if an input is any number?
Post: How to test if an input is any number?
This isn't a required part of a program, but I wanted to learn how to do this so I don't break my program everytime I input an incorrect value. I tried using
def is_number(s):
try:
float(s... |
|
wlsa |
Homework |
2 |
2,339 |
Oct-03-2018, 02:58 PM |
|
|
Thread: Why is this function returning none?
Post: Why is this function returning none?
def in1to10(n, outside_mode):
if outside_mode != True:
if n >= 1 and n <= 10:
return True
if outside_mode == True:
if n <= 1 or n >= 10:
ret... |
|
wlsa |
Homework |
2 |
5,809 |
Sep-30-2018, 05:01 AM |
|
|
Thread: "can only concatenate tuple"?
Post: "can only concatenate tuple"?
The question wants me to create a function that takes a tuple as an input, and returns a new tuple as an output, where every other element of the input tuple is copied, starting with the first element... |
|
wlsa |
Homework |
2 |
14,851 |
Jul-24-2018, 04:44 AM |
|
|
Thread: Another infinite loop
Post: RE: Another infinite loop
Fixed it, thanks for all your help. In the end I used this.
monthlyInterestrate=annualInterestRate/12
balance_initial=balance
lowerbound=(1/12)*balance
upperbound=balance*(1+monthlyInterestrate)**(12)... |
|
wlsa |
Homework |
7 |
4,677 |
Jul-20-2018, 12:04 AM |
|
|
Thread: Another infinite loop
Post: RE: Another infinite loop
I edited my code to
annualInterestRate=.1
balance=100
monthlyInterestrate=annualInterestRate/12
balance_initial=balance
lowerbound=(1/12)*balance
upperbound=balance*(1+monthlyInterestrate)**(12)/12
mo... |
|
wlsa |
Homework |
7 |
4,677 |
Jul-19-2018, 02:03 AM |
|
|
Thread: Another infinite loop
Post: Another infinite loop
The given problem: use bisectional search to find the minimum monthly payment to pay off debt after 12 payments (slight.
Assume that the interest is compounded monthly according to the balance at the ... |
|
wlsa |
Homework |
7 |
4,677 |
Jul-19-2018, 12:41 AM |
|
|
Thread: Why is this giving me an infinite loop?
Post: RE: Why is this giving me an infinite loop?
Also, what was wrong with line 10? I don't understand why I had to change that. |
|
wlsa |
Homework |
4 |
3,915 |
Jul-13-2018, 02:05 AM |
|
|
Thread: Why is this giving me an infinite loop?
Post: Why is this giving me an infinite loop?
def gcdIter(a, b):
'''
a, b: positive integers
returns: a positive integer, the greatest common divisor of a & b.
'''
# Your code here
r=1
GCD=1
smaller=b
... |
|
wlsa |
Homework |
4 |
3,915 |
Jul-13-2018, 12:23 AM |
|
|
Thread: Why is this the output I am getting?
Post: Why is this the output I am getting?
def func_a():
print('inside func_a')
def func_c(z):
print('inside func_c')
return z()
print(func_c(func_a))the output I get is
inside func_c
inside func_a
None
I'm having a hard time unde... |
|
wlsa |
Homework |
1 |
2,305 |
Jul-04-2018, 08:55 PM |